/*
 CopperLicht 3D Engine, Copyright by Nikolaus Gebhardt, Ambiera e.U.
 For license details, see www.ambiera.com/copperlicht
 For the full source, see http://www.ambiera.com/copperlicht/license.html#commercial
*/
function h(){return function(){}}function o(a){return function(b){this[a]=b}}function s(a){return function(){return this[a]}}function v(a){return function(){return a}}var w;DebugOutput=function(a){this.bc=null;a=document.getElementById(a);if(a==null)x=false;else if(this.bc=a.parentNode){this.Dd=document.createElement("div");this.bc.appendChild(this.Dd);this.wl=a=document.createTextNode("Loading...");this.Dd.appendChild(a)}};DebugOutput.prototype.print=function(a){x!=false&&aa(this,a,false)};
function ba(a,b){if(a.Dd)if(b==null)a.Dd.style.display="none";else{a.Dd.style.display="block";a.wl.nodeValue=b}}function y(a,b,d){aa(a,b,true,d)}function aa(a,b,d,e){if(!(x==false&&d!=true))if(e){a.bc.appendChild(document.createElement("br"));d=document.createElement("div");a.bc.appendChild(d);d.innerHTML=b}else{a.bc.appendChild(document.createElement("br"));b=document.createTextNode(b);a.bc.appendChild(b)}}var x=true,C=null;CCFileLoader=function(a){this.Be=a;this.xa=false;if(!this.xa&&typeof XMLHttpRequest!="undefined")try{this.xa=new XMLHttpRequest}catch(b){this.xa=false}if(!this.xa&&window.em)try{this.xa=window.em()}catch(d){this.xa=false}this.load=function(e){if(this.xa==false)y(C,"Your browser doesn't support AJAX");else{var f=this;try{this.xa.open("GET",this.Be,true)}catch(g){y(C,"Could not open file "+this.Be+": "+g.message);return}f=this;this.xa.onreadystatechange=function(){if(f.xa.readyState==4){f.xa.status!=
200&&f.xa.status!=0&&f.xa.status!=null&&y(C,"Could not open file "+f.Be+" (status:"+f.xa.status+")");e(f.xa.responseText)}};try{this.xa.send(null)}catch(j){y(C,"Could not open file "+f.Be)}}};this.Wn=function(e){alert("loaded :"+e)}};Core=h();Core.PI=3.14159265359;Core.Hn=1/3.14159265359;Core.Dn=1.570796326795;Core.Gn=3.141592653589793;Core.ye=3.14159265359/180;Core.Ld=57.29577951307855;Core.Ab=1.0E-8;Core.Nf=function(a){return a*Core.Ld};Core.Wj=function(a){return a*Core.ye};Core.G=function(a){return a<Core.Ab&&a>-Core.Ab};Core.Eb=function(a){return a+Core.Ab>=1&&a-Core.Ab<=1};Core.t=function(a,b){return a+Core.Ab>=b&&a-Core.Ab<=b};Core.$a=function(a,b,d){if(a<b)return b;if(a>d)return d;return a};
Core.$j=function(a){return a-Math.floor(a)};Core.Ak=function(a,b,d){if(a>b){if(a>d)return a;return d}if(b>d)return b;return d};Core.Qm=function(a,b,d){if(a<b){if(a<d)return a;return d}if(b<d)return b;return d};Core.Ah=function(a){return(a&4278190080)>>>24};Core.Ef=function(a){return(a&16711680)>>16};Core.Cf=function(a){return(a&65280)>>8};Core.yf=function(a){return a&255};Core.Tj=function(a,b,d,e){a&=255;b&=255;d&=255;e&=255;return a<<24|b<<16|d<<8|e};function F(){return(new Date).getTime()};Vect3d=function(a,b,d){if(a==null)this.Z=this.Y=this.X=0;else{this.X=a;this.Y=b;this.Z=d}};w=Vect3d.prototype;w.X=0;w.Y=0;w.Z=0;w.Tb=function(a,b,d){this.X=a;this.Y=b;this.Z=d};w.b=function(){return new Vect3d(this.X,this.Y,this.Z)};w.F=function(a){a.X=this.X;a.Y=this.Y;a.Z=this.Z};w.c=function(a){return new Vect3d(this.X-a.X,this.Y-a.Y,this.Z-a.Z)};w.xc=function(a){this.X-=a.X;this.Y-=a.Y;this.Z-=a.Z};w.add=function(a){return new Vect3d(this.X+a.X,this.Y+a.Y,this.Z+a.Z)};
w.R=function(a){this.X+=a.X;this.Y+=a.Y;this.Z+=a.Z};function ca(a,b){a.X+=b.X;a.Y+=b.Y;a.Z+=b.Z;return a}w=Vect3d.prototype;w.normalize=function(){var a=this.X*this.X+this.Y*this.Y+this.Z*this.Z;if(!(a>-1.0E-7&&a<1.0E-7)){a=1/Math.sqrt(a);this.X*=a;this.Y*=a;this.Z*=a}};w.xm=function(){var a=this.X*this.X+this.Y*this.Y+this.Z*this.Z;if(a>-1.0E-7&&a<1.0E-7)return new Vect3d(0,0,0);a=1/Math.sqrt(a);return new Vect3d(this.X*a,this.Y*a,this.Z*a)};
w.vc=function(a){var b=this.X*this.X+this.Y*this.Y+this.Z*this.Z;if(!(b>-1.0E-7&&b<1.0E-7)){b=a/Math.sqrt(b);this.X*=b;this.Y*=b;this.Z*=b}};w.Vb=function(a){this.X=a.X;this.Y=a.Y;this.Z=a.Z};w.t=function(a){return Core.t(this.X,a.X)&&Core.t(this.Y,a.Y)&&Core.t(this.Z,a.Z)};w.wf=function(){return Core.G(this.X)&&Core.G(this.Y)&&Core.G(this.Z)};w.Yj=function(a,b,d){return Core.t(this.X,a)&&Core.t(this.Y,b)&&Core.t(this.Z,d)};w.Nm=function(){return this.X==0&&this.Y==0&&this.Z==0};
w.qa=function(){return Math.sqrt(this.X*this.X+this.Y*this.Y+this.Z*this.Z)};w.va=function(a){var b=a.X-this.X,d=a.Y-this.Y;a=a.Z-this.Z;return Math.sqrt(b*b+d*d+a*a)};w.Sb=function(a){var b=a.X-this.X,d=a.Y-this.Y;a=a.Z-this.Z;return b*b+d*d+a*a};w.La=function(){return this.X*this.X+this.Y*this.Y+this.Z*this.Z};w.w=function(a){return new Vect3d(this.X*a,this.Y*a,this.Z*a)};w.Fa=function(a){this.X*=a;this.Y*=a;this.Z*=a};function G(a,b){a.X*=b;a.Y*=b;a.Z*=b;return a}w=Vect3d.prototype;
w.le=function(a){this.X*=a.X;this.Y*=a.Y;this.Z*=a.Z};w.Wh=function(a){return new Vect3d(this.X*a.X,this.Y*a.Y,this.Z*a.Z)};w.hm=function(a){this.X/=a.X;this.Y/=a.Y;this.Z/=a.Z};w.sf=function(a){return new Vect3d(this.X/a.X,this.Y/a.Y,this.Z/a.Z)};w.Aa=function(a){return new Vect3d(this.Y*a.Z-this.Z*a.Y,this.Z*a.X-this.X*a.Z,this.X*a.Y-this.Y*a.X)};w.z=function(a){return this.X*a.X+this.Y*a.Y+this.Z*a.Z};
w.fe=function(){var a=new Vect3d;a.Y=Core.Nf(Math.atan2(this.X,this.Z));if(a.Y<0)a.Y+=360;if(a.Y>=360)a.Y-=360;var b=Math.sqrt(this.X*this.X+this.Z*this.Z);a.X=Core.Nf(Math.atan2(b,this.Y))-90;if(a.X<0)a.X+=360;if(a.X>=360)a.X-=360;return a};w.toString=function(){return"(x: "+this.X+" y:"+this.Y+" z:"+this.Z+")"};Line3d=function(){this.Start=new Vect3d;this.End=new Vect3d};Line3d.prototype.Start=null;Line3d.prototype.End=null;Line3d.prototype.Gf=function(){return this.End.c(this.Start)};
Line3d.prototype.qa=function(){return this.Gf().qa()};Vect2d=function(a,b){if(a==null)this.Y=this.X=0;else{this.X=a;this.Y=b}};Vect2d.prototype.X=0;Vect2d.prototype.Y=0;Box3d=function(){this.MinEdge=new Vect3d;this.MaxEdge=new Vect3d};w=Box3d.prototype;w.MinEdge=null;w.MaxEdge=null;w.b=function(){var a=new Box3d;a.MinEdge=this.MinEdge.b();a.MaxEdge=this.MaxEdge.b();return a};w.db=function(){var a=this.MinEdge.add(this.MaxEdge);a.Fa(0.5);return a};w.Bf=function(){return this.MaxEdge.c(this.MinEdge)};
w.Bh=function(){var a=this.db(),b=a.c(this.MaxEdge),d=[];d.push(new Vect3d(a.X+b.X,a.Y+b.Y,a.Z+b.Z));d.push(new Vect3d(a.X+b.X,a.Y-b.Y,a.Z+b.Z));d.push(new Vect3d(a.X+b.X,a.Y+b.Y,a.Z-b.Z));d.push(new Vect3d(a.X+b.X,a.Y-b.Y,a.Z-b.Z));d.push(new Vect3d(a.X-b.X,a.Y+b.Y,a.Z+b.Z));d.push(new Vect3d(a.X-b.X,a.Y-b.Y,a.Z+b.Z));d.push(new Vect3d(a.X-b.X,a.Y+b.Y,a.Z-b.Z));d.push(new Vect3d(a.X-b.X,a.Y-b.Y,a.Z-b.Z));return d};
w.wk=function(a,b){var d=b.c(a),e=d.qa();d.normalize();a=a.add(b).w(0.5);b=e*0.5;e=this.Bf().w(0.5);a=this.db().c(a);if(Math.abs(a.X)>e.X+b*Math.abs(d.X)||Math.abs(a.Y)>e.Y+b*Math.abs(d.Y)||Math.abs(a.Z)>e.Z+b*Math.abs(d.Z))d=false;else{b=e.Y*Math.abs(d.Z)+e.Z*Math.abs(d.Y);if(Math.abs(a.Y*d.Z-a.Z*d.Y)>b)d=false;else{b=e.X*Math.abs(d.Z)+e.Z*Math.abs(d.X);if(Math.abs(a.Z*d.X-a.X*d.Z)>b)d=false;else{b=e.X*Math.abs(d.Y)+e.Y*Math.abs(d.X);d=Math.abs(a.X*d.Y-a.Y*d.X)>b?false:true}}}return d};
w.Mj=function(a,b,d){if(a>this.MaxEdge.X)this.MaxEdge.X=a;if(b>this.MaxEdge.Y)this.MaxEdge.Y=b;if(d>this.MaxEdge.Z)this.MaxEdge.Z=d;if(a<this.MinEdge.X)this.MinEdge.X=a;if(b<this.MinEdge.Y)this.MinEdge.Y=b;if(d<this.MinEdge.Z)this.MinEdge.Z=d};w.oa=function(a){this.Mj(a.X,a.Y,a.Z)};w.Qh=function(a){return this.MinEdge.X<=a.MaxEdge.X&&this.MinEdge.Y<=a.MaxEdge.Y&&this.MinEdge.Z<=a.MaxEdge.Z&&this.MaxEdge.X>=a.MinEdge.X&&this.MaxEdge.Y>=a.MinEdge.Y&&this.MaxEdge.Z>=a.MinEdge.Z};
w.tc=function(a){return a.X>=this.MinEdge.X&&a.X<=this.MaxEdge.X&&a.Y>=this.MinEdge.Y&&a.Y<=this.MaxEdge.Y&&a.Z>=this.MinEdge.Z&&a.Z<=this.MaxEdge.Z};Plane3d=function(){this.Normal=new Vect3d(0,1,0);this.Of(new Vect3d(0,0,0))};Plane3d.prototype.D=0;Plane3d.prototype.Normal=null;Plane3d.pl=0;Plane3d.ol=1;Plane3d.ql=2;w=Plane3d.prototype;w.b=function(){var a=new Plane3DF(false);a.Normal=this.Normal.b();a.D=this.D;return a};w.Of=function(a){this.D=-a.z(this.Normal)};w.jk=function(){return this.Normal.w(-this.D)};w.fi=function(a,b){this.Normal=b.b();this.Of(a)};w.Nk=function(a,b,d){this.Normal=b.c(a).Aa(d.c(a));this.Normal.normalize();this.Of(a)};
w.normalize=function(){var a=1/this.Normal.qa();this.Normal=this.Normal.w(a);this.D*=a};w.$l=function(a){a=this.Normal.z(a)+this.D;if(a<-1.0E-6)return ISREL3D_BACK;if(a>1.0E-6)return ISREL3D_FRONT;return ISREL3D_PLANAR};w.Df=function(a,b,d){var e=new Vect3d,f=new Vect3d;if(this.hk(a,e,f))return b.ge(e,f,d);return false};
w.hk=function(a,b,d){var e=this.Normal.qa(),f=this.Normal.z(a.Normal),g=a.Normal.qa(),j=e*g-f*f;if(Math.abs(j)<1.0E-8)return false;j=1/j;g=(g*-this.D+f*a.D)*j;e=(e*-a.D+f*this.D)*j;this.Normal.Aa(a.Normal).F(d);d=this.Normal.w(g);a=a.Normal.w(e);d.add(a).F(b);return true};w.ge=function(a,b,d){var e=this.Normal.z(b);if(e==0)return false;e=-(this.Normal.z(a)+this.D)/e;a.add(b.w(e)).F(d);return true};w.va=function(a){return a.z(this.Normal)+this.D};w.Rh=function(a){return this.Normal.z(a)<=0};Triangle3d=function(a,b,d){this.pointA=a?a:new Vect3d;this.pointB=b?b:new Vect3d;this.pointC=d?d:new Vect3d};w=Triangle3d.prototype;w.pointA=null;w.pointB=null;w.pointC=null;w.b=function(){return new Triangle3d(this.pointA,this.pointB,this.pointC)};w.Gh=function(){var a=new Plane3d(false);a.Nk(this.pointA,this.pointB,this.pointC);return a};
w.xk=function(a){var b=this.pointB.c(this.pointA),d=this.pointC.c(this.pointA),e=b.z(b),f=b.z(d),g=d.z(d);a=a.c(this.pointA);b=a.z(b);a=a.z(d);d=b*g-a*f;b=a*e-b*f;return d+b-(e*g-f*f)<0&&!(d<0||b<0)};w.tc=function(a){return da(this,a,this.pointA,this.pointB,this.pointC)&&da(this,a,this.pointB,this.pointA,this.pointC)&&da(this,a,this.pointC,this.pointA,this.pointB)};function da(a,b,d,e,f){a=f.c(e);b=a.Aa(b.c(e));d=a.Aa(d.c(e));return b.z(d)>=0}w=Triangle3d.prototype;w.Fh=function(){return this.pointB.c(this.pointA).Aa(this.pointC.c(this.pointA))};
w.gk=function(a,b){var d=this.Fh();d.normalize();var e=d.z(b);if(Core.G(e))return null;var f=this.pointA.z(d);d=-(d.z(a)-f)/e;return a.add(b.w(d))};w.ge=function(a,b){a=this.gk(a,b);if(a==null)return null;if(this.tc(a))return a;return null};w.yk=function(a){return a.tc(this.pointA)&&a.tc(this.pointB)&&a.tc(this.pointC)};w.F=function(a){this.pointA.F(a.pointA);this.pointB.F(a.pointB);this.pointC.F(a.pointC)};Matrix4=function(a){if(a==null)a=true;this.s=this.r=this.q=this.p=this.o=this.f=this.l=this.k=this.n=this.j=this.e=this.i=this.m=this.h=this.g=this.d=0;this.U=false;if(a){this.s=this.f=this.e=this.d=1;this.U=true}};w=Matrix4.prototype;w.zk=function(){this.d=1;this.i=this.m=this.h=this.g=0;this.e=1;this.l=this.k=this.n=this.j=0;this.f=1;this.r=this.q=this.p=this.o=0;this.s=1;this.U=true};
w.Jf=function(){if(this.U)return true;return this.U=Core.Eb(this.d)&&Core.G(this.g)&&Core.G(this.h)&&Core.G(this.m)&&Core.G(this.i)&&Core.Eb(this.e)&&Core.G(this.j)&&Core.G(this.n)&&Core.G(this.k)&&Core.G(this.l)&&Core.Eb(this.f)&&Core.G(this.o)&&Core.G(this.p)&&Core.G(this.q)&&Core.G(this.r)&&Core.Eb(this.s)};
w.Sh=function(){if(this.U)return true;return Core.Eb(this.d)&&Core.G(this.g)&&Core.G(this.h)&&Core.G(this.m)&&Core.G(this.i)&&Core.Eb(this.e)&&Core.G(this.j)&&Core.G(this.n)&&Core.G(this.k)&&Core.G(this.l)&&Core.Eb(this.f)&&Core.G(this.o)&&Core.Eb(this.s)};
w.t=function(a){return Core.t(this.d,a.d)&&Core.t(this.g,a.g)&&Core.t(this.h,a.h)&&Core.t(this.m,a.m)&&Core.t(this.i,a.i)&&Core.t(this.e,a.e)&&Core.t(this.j,a.j)&&Core.t(this.n,a.n)&&Core.t(this.k,a.k)&&Core.t(this.l,a.l)&&Core.t(this.f,a.f)&&Core.t(this.o,a.o)&&Core.t(this.p,a.p)&&Core.t(this.q,a.q)&&Core.t(this.r,a.r)&&Core.t(this.s,a.s)};w.tk=function(){return new Vect3d(this.p,this.q,this.r)};w.qk=function(){return new Vect3d(this.d,this.e,this.f)};
w.en=function(a){var b=a.b();a.X=b.X*this.d+b.Y*this.i+b.Z*this.k;a.Y=b.X*this.g+b.Y*this.e+b.Z*this.l;a.Z=b.X*this.h+b.Y*this.j+b.Z*this.f};w.Hk=function(a,b){a.X=b.X*this.d+b.Y*this.i+b.Z*this.k;a.Y=b.X*this.g+b.Y*this.e+b.Z*this.l;a.Z=b.X*this.h+b.Y*this.j+b.Z*this.f};w.Bm=function(a){return new Vect3d(a.X*this.d+a.Y*this.i+a.Z*this.k,a.X*this.g+a.Y*this.e+a.Z*this.l,a.X*this.h+a.Y*this.j+a.Z*this.f)};
w.Db=function(a){return new Vect3d(a.X*this.d+a.Y*this.i+a.Z*this.k+this.p,a.X*this.g+a.Y*this.e+a.Z*this.l+this.q,a.X*this.h+a.Y*this.j+a.Z*this.f+this.r)};w.dd=function(a){var b=a.X*this.g+a.Y*this.e+a.Z*this.l+this.q,d=a.X*this.h+a.Y*this.j+a.Z*this.f+this.r;a.X=a.X*this.d+a.Y*this.i+a.Z*this.k+this.p;a.Y=b;a.Z=d};w.Xk=function(a,b){a.X=b.X*this.d+b.Y*this.i+b.Z*this.k+this.p;a.Y=b.X*this.g+b.Y*this.e+b.Z*this.l+this.q;a.Z=b.X*this.h+b.Y*this.j+b.Z*this.f+this.r};
w.rc=function(a){return new Vect3d(a.X+this.p,a.Y+this.q,a.Z+this.r)};w.wn=function(a){a.X+=this.p;a.Y+=this.q;a.Z+=this.r};w.vn=function(a){var b=a.jk();this.dd(b);var d=a.Normal.b();d.normalize();var e=this.qk();if(!Core.t(e.X,0)&&!Core.t(e.Y,0)&&!Core.t(e.Z,0)&&(!Core.t(e.X,1)||!Core.t(e.Y,1)||!Core.t(e.Z,1))){d.X*=1/(e.X*e.X);d.Y*=1/(e.Y*e.Y);d.Z*=1/(e.Z*e.Z)}rotateVect(d);d.normalize();a.fi(b,d)};
w.ia=function(a){var b=new Matrix4(false);if(this.U){a.F(b);return b}if(a.U){this.F(b);return b}b.d=this.d*a.d+this.i*a.g+this.k*a.h+this.p*a.m;b.g=this.g*a.d+this.e*a.g+this.l*a.h+this.q*a.m;b.h=this.h*a.d+this.j*a.g+this.f*a.h+this.r*a.m;b.m=this.m*a.d+this.n*a.g+this.o*a.h+this.s*a.m;b.i=this.d*a.i+this.i*a.e+this.k*a.j+this.p*a.n;b.e=this.g*a.i+this.e*a.e+this.l*a.j+this.q*a.n;b.j=this.h*a.i+this.j*a.e+this.f*a.j+this.r*a.n;b.n=this.m*a.i+this.n*a.e+this.o*a.j+this.s*a.n;b.k=this.d*a.k+this.i*
a.l+this.k*a.f+this.p*a.o;b.l=this.g*a.k+this.e*a.l+this.l*a.f+this.q*a.o;b.f=this.h*a.k+this.j*a.l+this.f*a.f+this.r*a.o;b.o=this.m*a.k+this.n*a.l+this.o*a.f+this.s*a.o;b.p=this.d*a.p+this.i*a.q+this.k*a.r+this.p*a.s;b.q=this.g*a.p+this.e*a.q+this.l*a.r+this.q*a.s;b.r=this.h*a.p+this.j*a.q+this.f*a.r+this.r*a.s;b.s=this.m*a.p+this.n*a.q+this.o*a.r+this.s*a.s;return b};
w.Bk=function(a){var b=a.b();b.I=a.W;a.X=b.X*this.d+b.Y*this.i+b.Z*this.k+b.I*this.p;a.Y=b.X*this.g+b.Y*this.e+b.Z*this.l+b.I*this.q;a.Z=b.X*this.h+b.Y*this.j+b.Z*this.f+b.I*this.r;a.W=b.X*this.m+b.Y*this.n+b.Z*this.o+b.I*this.s};
w.Ch=function(a){if(this.U){this.F(a);return true}var b=(this.d*this.e-this.g*this.i)*(this.f*this.s-this.o*this.r)-(this.d*this.j-this.h*this.i)*(this.l*this.s-this.o*this.q)+(this.d*this.n-this.m*this.i)*(this.l*this.r-this.f*this.q)+(this.g*this.j-this.h*this.e)*(this.k*this.s-this.o*this.p)-(this.g*this.n-this.m*this.e)*(this.k*this.r-this.f*this.p)+(this.h*this.n-this.m*this.j)*(this.k*this.q-this.l*this.p);if(b>-1.0E-7&&b<1.0E-7)return false;b=1/b;a.d=b*(this.e*(this.f*this.s-this.o*this.r)+
this.j*(this.o*this.q-this.l*this.s)+this.n*(this.l*this.r-this.f*this.q));a.g=b*(this.l*(this.h*this.s-this.m*this.r)+this.f*(this.m*this.q-this.g*this.s)+this.o*(this.g*this.r-this.h*this.q));a.h=b*(this.q*(this.h*this.n-this.m*this.j)+this.r*(this.m*this.e-this.g*this.n)+this.s*(this.g*this.j-this.h*this.e));a.m=b*(this.g*(this.n*this.f-this.j*this.o)+this.h*(this.e*this.o-this.n*this.l)+this.m*(this.j*this.l-this.e*this.f));a.i=b*(this.j*(this.k*this.s-this.o*this.p)+this.n*(this.f*this.p-this.k*
this.r)+this.i*(this.o*this.r-this.f*this.s));a.e=b*(this.f*(this.d*this.s-this.m*this.p)+this.o*(this.h*this.p-this.d*this.r)+this.k*(this.m*this.r-this.h*this.s));a.j=b*(this.r*(this.d*this.n-this.m*this.i)+this.s*(this.h*this.i-this.d*this.j)+this.p*(this.m*this.j-this.h*this.n));a.n=b*(this.h*(this.n*this.k-this.i*this.o)+this.m*(this.i*this.f-this.j*this.k)+this.d*(this.j*this.o-this.n*this.f));a.k=b*(this.n*(this.k*this.q-this.l*this.p)+this.i*(this.l*this.s-this.o*this.q)+this.e*(this.o*this.p-
this.k*this.s));a.l=b*(this.o*(this.d*this.q-this.g*this.p)+this.k*(this.g*this.s-this.m*this.q)+this.l*(this.m*this.p-this.d*this.s));a.f=b*(this.s*(this.d*this.e-this.g*this.i)+this.p*(this.g*this.n-this.m*this.e)+this.q*(this.m*this.i-this.d*this.n));a.o=b*(this.m*(this.e*this.k-this.i*this.l)+this.d*(this.n*this.l-this.e*this.o)+this.g*(this.i*this.o-this.n*this.k));a.p=b*(this.i*(this.f*this.q-this.l*this.r)+this.e*(this.k*this.r-this.f*this.p)+this.j*(this.l*this.p-this.k*this.q));a.q=b*(this.k*
(this.h*this.q-this.g*this.r)+this.l*(this.d*this.r-this.h*this.p)+this.f*(this.g*this.p-this.d*this.q));a.r=b*(this.p*(this.h*this.e-this.g*this.j)+this.q*(this.d*this.j-this.h*this.i)+this.r*(this.g*this.i-this.d*this.e));a.s=b*(this.d*(this.e*this.f-this.j*this.l)+this.g*(this.j*this.k-this.i*this.f)+this.h*(this.i*this.l-this.e*this.k));a.U=this.U;return true};w.Vh=function(){var a=new Matrix4(false);if(this.Ch(a)){a.F(this);return true}return false};
w.Nj=function(){return[this.d,this.g,this.h,this.m,this.i,this.e,this.j,this.n,this.k,this.l,this.f,this.o,this.p,this.q,this.r,this.s]};
w.Ik=function(a,b){this.U=false;switch(a){case 0:this.d=b;break;case 1:this.g=b;break;case 2:this.h=b;break;case 3:this.m=b;break;case 4:this.i=b;break;case 5:this.e=b;break;case 6:this.j=b;break;case 7:this.n=b;break;case 8:this.k=b;break;case 9:this.l=b;break;case 10:this.f=b;break;case 11:this.o=b;break;case 12:this.p=b;break;case 13:this.q=b;break;case 14:this.r=b;break;case 15:this.s=b;break}};w.b=function(){var a=new Matrix4(false);this.F(a);return a};
w.F=function(a){a.d=this.d;a.g=this.g;a.h=this.h;a.m=this.m;a.i=this.i;a.e=this.e;a.j=this.j;a.n=this.n;a.k=this.k;a.l=this.l;a.f=this.f;a.o=this.o;a.p=this.p;a.q=this.q;a.r=this.r;a.s=this.s;a.U=this.U};w.sh=function(a,b,d,e){a=1/Math.tan(a/2);this.d=a/b;this.i=this.m=this.h=this.g=0;this.e=a;this.l=this.k=this.n=this.j=0;this.f=e/(e-d);this.o=1;this.q=this.p=0;this.r=-d*e/(e-d);this.s=0;this.U=false};
w.Qj=function(a,b,d){b=b.c(a);b.normalize();d=d.Aa(b);d.normalize();var e=b.Aa(d);this.d=d.X;this.g=e.X;this.h=b.X;this.m=0;this.i=d.Y;this.e=e.Y;this.j=b.Y;this.n=0;this.k=d.Z;this.l=e.Z;this.f=b.Z;this.o=0;this.p=-d.z(a);this.q=-e.z(a);this.r=-b.z(a);this.s=1;this.U=false};w.wc=function(a){this.Qk(a.w(Core.ye))};
w.Qk=function(a){var b=Math.cos(a.X),d=Math.sin(a.X),e=Math.cos(a.Y),f=Math.sin(a.Y),g=Math.cos(a.Z);a=Math.sin(a.Z);this.d=e*g;this.g=e*a;this.h=-f;var j=d*f;f=b*f;this.i=j*g-b*a;this.e=j*a+b*g;this.j=d*e;this.k=f*g+d*a;this.l=f*a-d*g;this.f=b*e;this.U=false};
w.Jh=function(){var a=-Math.asin(this.h),b=Math.cos(a);a*=Core.Ld;var d,e;if(Math.abs(b)>Core.Ab){var f=1/b;d=this.f*f;e=this.j*f;b=Math.atan2(e,d)*Core.Ld;d=this.d*f;e=this.g*f}else{b=0;d=this.e;e=-this.i}d=Math.atan2(e,d)*Core.Ld;if(b<0)b+=360;if(a<0)a+=360;if(d<0)d+=360;return new Vect3d(b,a,d)};w.ii=function(a){this.p=a.X;this.q=a.Y;this.r=a.Z;this.U=false};w.gi=function(a){this.d=a.X;this.e=a.Y;this.f=a.Z;this.U=false};w.Rk=function(a,b,d){this.d=a;this.e=b;this.f=d;this.U=false};
w.oe=function(a){var b=a.Bh(),d;for(d=0;d<8;++d)this.dd(b[d]);d=b[0];a.MinEdge=d.b();a.MaxEdge=d.b();for(d=1;d<8;++d)a.oa(b[d])};Quaternion=function(a,b,d,e){this.Z=this.Y=this.X=0;this.I=1;if(a!=null)this.X=a;if(b!=null)this.Y=b;if(d!=null)this.Z=d;if(e!=null)this.I=e};w=Quaternion.prototype;w.X=0;w.Y=0;w.Z=0;w.I=0;w.b=function(){var a=new Quaternion;this.F(a);return a};w.F=function(a){a.X=this.X;a.Y=this.Y;a.Z=this.Z;a.I=this.I};w.Mf=function(a){return new Quaternion(this.X*a,this.Y*a,this.Z*a,this.I*a)};w.R=function(a){this.X+=a.X;this.Y+=a.Y;this.Z+=a.Z;this.I+=a.I;return this};
w.ji=function(a,b,d){var e=a.z(b);if(e<0){a=a.Mf(-1);e*=-1}if(e+1>0.05)if(1-e>=0.05){var f=Math.acos(e),g=1/Math.sin(f);e=Math.sin(f*(1-d))*g;d=Math.sin(f*d)*g}else{e=1-d;d=d}else{b=new Quaternion(-a.Y,a.X,-a.I,a.Z);e=Math.sin(Core.PI*(0.5-d));d=Math.sin(Core.PI*d)}a=a.Mf(e).R(b.Mf(d));this.X=a.X;this.Y=a.Y;this.Z=a.Z;this.I=a.I};w.z=function(a){return this.X*a.X+this.Y*a.Y+this.Z*a.Z+this.I*a.I};
w.ik=function(){var a=new Matrix4(false),b=this.X,d=this.Y,e=this.Z,f=this.I;a.d=1-2*d*d-2*e*e;a.i=2*b*d+2*e*f;a.k=2*b*e-2*d*f;a.p=0;a.g=2*b*d-2*e*f;a.e=1-2*b*b-2*e*e;a.l=2*e*d+2*b*f;a.q=0;a.h=2*b*e+2*d*f;a.j=2*e*d-2*b*f;a.f=1-2*b*b-2*d*d;a.r=0;a.m=0;a.n=0;a.o=0;a.s=1;a.U=false;return a};
w.Wk=function(a){var b=this.I*this.I,d=this.X*this.X,e=this.Y*this.Y,f=this.Z*this.Z;a.Z=Math.atan2(2*(this.X*this.Y+this.Z*this.I),d-e-f+b);a.X=Math.atan2(2*(this.Y*this.Z+this.X*this.I),-d-e+f+b);a.Y=Math.asin(Core.$a(-2*(this.X*this.Z-this.Y*this.I),-1,1))};w.ci=function(a,b,d){var e=a*0.5;a=Math.sin(e);var f=Math.cos(e);e=b*0.5;b=Math.sin(e);var g=Math.cos(e);e=d*0.5;d=Math.sin(e);var j=Math.cos(e);e=g*j;j=b*j;g=g*d;b=b*d;this.X=a*e-f*b;this.Y=f*j+a*g;this.Z=f*g-a*j;this.I=f*e+a*b;this.normalize()};
w.normalize=function(){var a=this.X*this.X+this.Y*this.Y+this.Z*this.Z+this.I*this.I;if(a!=1){a=a=1/Math.sqrt(a);this.X*=a;this.Y*=a;this.Z*=a;this.I*=a}};w.toString=function(){return"(x: "+X+" y:"+Y+" z:"+Z+" w:"+W+")"};ViewFrustrum=function(){this.ja=[];for(var a=0;a<ViewFrustrum.Hj;++a)this.ja.push(new Plane3d)};ViewFrustrum.prototype.ja=null;ViewFrustrum.mf=0;ViewFrustrum.Sl=1;ViewFrustrum.nh=2;ViewFrustrum.Ij=3;ViewFrustrum.Gj=4;ViewFrustrum.oh=5;ViewFrustrum.Hj=6;
ViewFrustrum.prototype.bi=function(a){var b;b=this.ja[ViewFrustrum.nh];b.Normal.X=a.m+a.d;b.Normal.Y=a.n+a.i;b.Normal.Z=a.o+a.k;b.D=a.s+a.p;b=this.ja[ViewFrustrum.Ij];b.Normal.X=a.m-a.d;b.Normal.Y=a.n-a.i;b.Normal.Z=a.o-a.k;b.D=a.s-a.p;b=this.ja[ViewFrustrum.oh];b.Normal.X=a.m-a.g;b.Normal.Y=a.n-a.e;b.Normal.Z=a.o-a.l;b.D=a.s-a.q;b=this.ja[ViewFrustrum.Gj];b.Normal.X=a.m+a.g;b.Normal.Y=a.n+a.e;b.Normal.Z=a.o+a.l;b.D=a.s+a.q;b=this.ja[ViewFrustrum.mf];b.Normal.X=a.m-a.h;b.Normal.Y=a.n-a.j;b.Normal.Z=
a.o-a.f;b.D=a.s-a.r;b=this.ja[ViewFrustrum.Sl];b.Normal.X=a.h;b.Normal.Y=a.j;b.Normal.Z=a.f;b.D=a.r;for(a=a=0;a<ViewFrustrum.Hj;++a){b=this.ja[a];var d=-(1/b.Normal.qa());b.Normal=b.Normal.w(d);b.D*=d}this.ad()};ViewFrustrum.prototype.ad=h();Vertex3D=function(a){if(a){this.Pos=new Vect3d;this.Normal=new Vect3d;this.Color=4294967295;this.TCoords=new Vect2d;this.TCoords2=new Vect2d}};w=Vertex3D.prototype;w.Pos=null;w.Normal=null;w.Color=0;w.TCoords=null;w.TCoords2=null;Texture=function(){this.Name="";this.ec=false;this.fg=this.gg=this.Qa=this.jb=null};w=Texture.prototype;w.vm=s("jb");w.Nh=s("Qa");w.fb=function(){if(this.jb)return this.jb.width;if(this.gg!=null)return this.gg;return 0};w.eb=function(){if(this.jb)return this.jb.height;if(this.fg!=null)return this.fg;return 0};w.Hm=s("Name");w.Kf=s("ec");Action=h();Action.prototype.execute=h();Action.mj=function(){this.Ca="";this.Nc=null;this.sa=false;this.Type="SetOverlayText"};Action.mj.prototype.execute=function(a,b){if(a&&b){var d=null;if(this.sa)d=a;else if(this.Nc!=-1)d=b.Ma(this.Nc);d&&d.hi&&d.hi(this.Ca)}};Action.Ni=function(){this.Hi=false;this.$g=null;this.sa=false;this.Type="MakeSceneNodeInvisible"};
Action.Ni.prototype.execute=function(a,b){if(a&&b){var d=null;if(this.sa)d=a;else if(this.$g!=-1)d=b.Ma(this.$g);if(d)switch(this.Hi){case 0:d.Visible=false;break;case 1:d.Visible=true;break;case 2:d.Visible=!d.Visible;break}}};Action.ui=function(){this.nc=this.$d=false;this.Type="ChangeSceneNodePosition"};
Action.ui.prototype.execute=function(a,b){if(a&&b){var d=null;if(this.sa)d=a;else if(this.Qd!=-1)d=b.Ma(this.Qd);if(d){var e=null;switch(this.Rg){case 0:e=this.na.b();break;case 1:e=d.Pos.add(this.na);break;case 2:var f=null;if(this.Xg)f=a;else if(this.Pd!=-1)f=b.Ma(this.Pd);if(f)e=f.Pos.add(this.na);break}if(e!=null)if(this.$d&&this.nc>0){a=new AnimatorFlyStraight;a.Start=d.Pos.b();a.End=e;a.Mb=this.nc;a.ud=true;J(a);d.Vc(a)}else d.Pos=e}}};Action.vi=function(){this.Type="ChangeSceneNodeRotation"};
Action.vi.prototype.execute=function(a,b){if(a&&b){var d=null;if(this.sa)d=a;else if(this.ij!=-1)d=b.Ma(this.ij);if(d)switch(this.Ll){case 0:d.Rot=this.na.b();break;case 1:d.Rot=d.Rot.add(this.na);break}}};Action.wi=function(){this.Type="ChangeSceneNodeScale"};Action.wi.prototype.execute=function(a,b){if(a&&b){var d=null;if(this.sa)d=a;else if(this.jj!=-1)d=b.Ma(this.jj);if(d)switch(this.Ml){case 0:d.Scale=this.na.b();break;case 1:d.Scale=d.Scale.Wh(this.na);break}}};
Action.xi=function(){this.Type="ChangeSceneNodeTexture"};Action.xi.prototype.execute=function(a,b){if(a&&b){var d=null;if(this.sa)d=a;else if(this.Nc!=-1)d=b.Ma(this.Nc);if(d){a=d.getMaterialCount();for(b=0;b<a;++b)d.getMaterial(b).Tex1=this.Cj}}};Action.Di=function(){this.Type="ExecuteJavaScript"};Action.Di.prototype.execute=function(){eval(this.sl)};Action.Ti=function(){this.Type="OpenWebpage"};Action.Ti.prototype.execute=function(){window.open(this.Ul,this.Pa)};Action.nj=function(){this.Type="SetSceneNodeAnimation"};
Action.nj.prototype.execute=h();Action.vj=function(a){this.xd=a;this.Type="SwitchToScene"};Action.vj.prototype.execute=function(){this.xd&&ea(this.xd,this.Nl,true)};Action.kj=function(a){this.xd=a;this.Type="SetActiveCamera"};Action.kj.prototype.execute=function(a,b){if(a&&b){a=null;if(this.ti!=-1)a=b.Ma(this.ti);a!=null&&a.getType()=="camera"&&this.xd&&fa(this.xd,a)}};Action.lj=function(){this.$d=false;this.nc=0;this.Type="SetCameraTarget"};
Action.lj.prototype.execute=function(a,b){if(a&&b){var d=null;if(this.sa)d=a;else if(this.Qd!=-1)d=b.Ma(this.Qd);var e=d;if(e.getType()=="camera"){var f=e.qb().b();switch(this.Rg){case 0:f=this.na.b();break;case 1:f=d.Pos.add(this.na);break;case 2:var g=null;if(this.Xg)g=a;else if(this.Pd!=-1)g=b.Ma(this.Pd);if(g)f=g.Pos.add(this.na);break}if(f!=null)if(this.$d&&this.nc>0){a=new AnimatorFlyStraight;a.Start=e.qb().b();a.End=f;a.Mb=this.nc;a.ud=true;a.ag=true;J(a);d.Vc(a)}else e.Ub(f)}}};
Action.oj=function(){this.ri=this.pg=this.bh=0;this.ah=-1;this.ae=100;this.Type="Shoot"};
Action.oj.prototype.execute=function(a,b){if(a&&b){var d=new Line3d,e=false;if(a!=null){var f=a.Rb("gameai");if(f&&f.ng){d=f.og;e=true}}if(!e)if(f=b.Ea()){d.Start=f.aa();d.End=f.qb();e=true}if(e){e=d.Gf();e.vc(this.ae);d.End=d.Start.add(e);e=ga(b,"gameai");if(e.length!=0)if(f=e[0].Rb("gameai"))if(f=f.ua){f=ha(AnimatorOnClick.prototype,b,d.Start,d.End,f);if(f<this.ae){var g=d.Gf();g.vc(f);d.End=d.Start.add(g)}}if(this.bh==1){e=null;if(this.ah!=-1)e=b.Ma(this.ah);if(e){e=e.createClone(b.je());b.je().Da(e);
if(e!=null){e.Pos=d.Start;e.Ba();e.Visible=true;e.Id=-1;e.Name="";b=this.ri;if(b==0)b=1;f=new AnimatorFlyStraight;f.Start=d.Start;f.End=d.End;f.Mb=d.qa()/b;f.ud=true;J(f);f.Bj=true;f.qj=a;f.pj=this.pg;f.Ai=true;e.Vc(f)}}}else if(this.bh==0){g=this.ae;f=null;for(var j=0;j<e.length;++j)if(e[j]!==a){var m=e[j].Rb("gameai");if(!(m&&!(m.vb>0))){m={};m.N=0;if(ia(AnimatorOnClick.prototype,b,e[j],d,false,false,null,m))if(m.N<g){g=m.N;f=e[j]}}}if(f!=null)(a=f.Rb("gameai"))&&ja(a,this.pg,f)}}}};
ActionHandler=function(a){this.ld=[];this.lc=a};ActionHandler.prototype.execute=function(a){for(var b=0;b<this.ld.length;++b)this.ld[b].execute(a,this.lc)};function ka(a,b){b!=null&&a.ld.push(b)};Material=function(){this.Type=0;this.Bb=this.Tex1=null;this.ZWriteEnabled=true;this.Cd=this.ClampTexture1=false};w=Material.prototype;w.bi=function(a){if(a){this.Type=a.Type;this.ZWriteEnabled=a.ZWriteEnabled;this.Tex1=a.Tex1;this.Bb=a.Bb;this.ClampTexture1=a.ClampTexture1;this.Cd=a.Cd}};w.b=function(){var a=new Material;a.Type=this.Type;a.ZReadEnabled=this.ZReadEnabled;a.ZWriteEnabled=this.ZWriteEnabled;a.Tex1=this.Tex1;a.Bb=this.Bb;a.ClampTexture1=this.ClampTexture1;a.Cd=this.Cd;return a};
w.isTransparent=function(){return this.Type==Material.sg||this.Type==Material.tg};w.Type=0;w.Tex1=null;w.Bb=null;w.ZWriteEnabled=true;w.ZReadEnabled=true;w.ClampTexture1=false;Material.rg=0;Material.wd=2;Material.sg=12;Material.tg=13;MeshBuffer=function(){this.Box=new Box3d;this.Mat=new Material;this.Indices=[];this.Vertices=[];this.RendererNativeArray=null};w=MeshBuffer.prototype;w.Box=null;w.Mat=null;w.Indices=null;w.Vertices=null;w.RendererNativeArray=null;w.update=function(){this.RendererNativeArray=null};
w.ad=function(){if(!this.Vertices||this.Vertices.length==0)this.Box.reset(0,0,0);else{var a=this.Vertices[0];this.Box.MinEdge=a.Pos.b();this.Box.MaxEdge=a.Pos.b();for(var b=1;b<this.Vertices.length;++b){a=this.Vertices[b];this.Box.oa(a.Pos)}}};Mesh=function(){this.Box=new Box3d;this.ha=[]};Mesh.prototype.Ua=function(a){this.ha.push(a)};Mesh.prototype.ll=s("ha");Mesh.prototype.Fi=function(){var a=0;if(this.ha)for(var b=0;b<this.ha.length;++b)if(this.ha[b].Indices)a+=this.ha[b].Indices.length;return a/3};MeshCache=function(){this.Hg=[]};function la(a,b){for(var d=0;d<a.Hg.length;++d){var e=a.Hg[d];if(e.Name==b)return e}return null}SkinnedMeshJoint=function(){this.Name="";this.Ed=new Matrix4;this.B=[];this.pd=[];this.gc=[];this.Lb=[];this.kc=[];this.oc=[];this.Ce=new Matrix4;this.Dc=new Matrix4;this.Ic=new Matrix4;this.md=new Vect3d(0,0,0);this.od=new Vect3d(1,1,1);this.nd=new Quaternion;this.yd=new Matrix4;this.Gi=false;this.ao=this.bo=this.Yn=-1};
SkinnedMeshWeight=function(){this.ne=this.pe=this.be=0;this.uj=new Vect3d;this.tj=new Vect3d};SkinnedMeshScaleKey=function(){this.frame=0;this.scale=new Vect3d};SkinnedMeshPositionKey=function(){this.frame=0;this.position=new Vect3d};SkinnedMeshRotationKey=function(){this.frame=0;this.rotation=new Quaternion};NamedAnimationRange=function(){this.Name="";this.FPS=this.End=this.Begin=0};NamedAnimationRange.prototype.Name="";NamedAnimationRange.prototype.Begin=0;NamedAnimationRange.prototype.End=0;
NamedAnimationRange.prototype.FPS=0;SkinnedMesh=function(){this.Name="";this.sb=[];this.tb=0;this.ca=[];this.ba=[];this.jc=[];this.hl=0;this.Wi=this.Fc=false;this.An=this.vl=this.Cg=0;this.ka=new Box3d;this.Gc=1;this.bg=false;this.nf=[];this.Kc=[]};SkinnedMesh.prototype.Ua=function(a){this.ca.push(a)};SkinnedMesh.prototype.getBoundingBox=s("ka");
function ma(a,b,d){if(!(b==null&&d!=null))if(b==null)for(b=0;b<a.jc.length;++b)ma(a,a.jc[b],null);else{b.Ce=d==null?b.Ed.b():d.Ce.ia(b.Ed);b.Ic=b.Ed.b();b.Dc=b.Ce.b();if(b.yd.Jf()){b.yd=b.Ce.b();b.yd.Vh()}for(d=0;d<b.B.length;++d)ma(a,b.B[d],b)}}function na(a,b,d){if(b==null)for(b=0;b<a.jc.length;++b)na(a,a.jc[b],null);else{b.Dc=d==null||b.Gi?b.Ic.b():d.Dc.ia(b.Ic);for(d=0;d<b.B.length;++d)na(a,b.B[d],b)}}
function oa(a,b){if(b.oc.length)for(var d=b.Dc.ia(b.yd),e=new Vect3d,f=new Vect3d,g=a.ca,j,m=0;m<b.oc.length;++m){var l=b.oc[m];d.Xk(e,l.uj);a.bg&&d.Hk(f,l.tj);j=g[l.be];j=j.Vertices[l.pe];if(a.nf[l.be][l.pe]){j.Pos.R(e.w(l.ne));if(a.bg)j.Normal+=f.w(l.ne)}else{a.nf[l.be][l.pe]=true;j.Pos=e.w(l.ne);if(a.bg)j.Normal=f.w(l.ne)}}for(d=0;d<b.B.length;++d)oa(a,b.B[d],b)}
function pa(a,b){if(!b)return null;var d=a.Kc.length;b=b.toLowerCase();for(var e=0;e<d;++e){var f=a.Kc[e];if(f.Name&&f.Name.toLowerCase()==b)return f}return null};TextureManager=function(){this.da=[];this.$=null;this.Og=""};
TextureManager.prototype.rk=function(a,b){if(a==null||a=="")return null;var d=qa(this,a);if(d!=null)return d;if(b){d=new Texture;d.Name=a;ra(this,d);var e=this;d.jb=new Image;d.jb.onload=function(){var f=d,g=e.$;if(g!=null){var j=g.L,m=j.Uj(),l=f.jb;if((l.width&l.width-1)!=0||(l.height&l.height-1)!=0){var n=document.createElement("canvas");if(n!=null){n.width=sa(g,l.width);n.height=sa(g,l.height);n.getContext("2d").drawImage(l,0,0,l.width,l.height,0,0,n.width,n.height);l=n}}j.nb(j.T,m);ta(g,m,l);
j.ak(j.T);j.Xb(j.T,j.wj,j.Ii);j.Xb(j.T,j.xj,j.Ji);j.nb(j.T,null);g.ki=true;f.Qa=m;f.ec=true}};d.jb.src=d.Name;return d}return null};TextureManager.prototype.sk=function(){return this.da.length};TextureManager.prototype.ck=function(){for(var a=0,b=0;b<this.da.length;++b)this.da[b].ec==false&&++a;return a};function qa(a,b){for(var d=0;d<a.da.length;++d){var e=a.da[d];if(e.Name==b)return e}return null}
function ra(a,b){if(b!=null){qa(a,b.Name)!=null&&C.print("ERROR! Cannot add the texture multiple times: "+b.Name);a.da.push(b)}};BinaryStream=function(a){this.Lj=a;this.Wl=a.length;this.P=0;this.Nn=null;this.On=8;this.Sn=false};function K(a){return a.Wl-a.P}function ua(a,b){return a.Lj.charCodeAt(b)&255}function L(a){return M(a,1)!=0}function N(a,b){for(var d=0,e=a.P,f=e+b;f>e;)d=d*256+ua(a,--f);a.P+=b;return d}function M(a,b){a=N(a,b);if(a&1<<b*8-1)a=(~a+1)*-1;return a}function O(a){return M(a,4)}
function P(a){var b;var d=a.Lj,e=a.P;b=d.charCodeAt(e+3)&255;var f=d.charCodeAt(e+2)&255,g=d.charCodeAt(e+1)&255;e=d.charCodeAt(e+0)&255;d=(b<<1&255|f>>7)-127;f=(f&127)<<16|g<<8|e;b=f==0&&d==-127?0:(1-2*(b>>7))*(1+f*Math.pow(2,-23))*Math.pow(2,d);a.P+=4;return b}BinaryStream.prototype.reset=function(){this.P=0;return this};Renderer=function(){this.L=this.canvas=null;this.height=this.width=0;this.ki=false;this.Ja=new Matrix4;this.of=new Matrix4;this.ua=new Matrix4;this.Zn=this.$n=null;this.Wa=[];this.Ig=20;this.ab=this.Sg=this.Yi=this.Xi=null};Renderer.prototype.fb=s("width");function va(a){var b=a.ki;a.ki=false;return b}w=Renderer.prototype;w.Im=s("L");w.eb=s("height");w.uf=function(a){if(a!=null)for(var b=0;b<a.ha.length;++b){var d=a.ha[b];this.Rf(d.Mat);this.vf(d)}};
w.Rf=function(a){if(a!=null){var b=this.L;if(b!=null){var d=null;try{d=this.Wa[a.Type]}catch(e){}if(d){this.ab=d;b.ed(d);if(d.Yl){b.Xc(b.Yb);b.rf(d.Zl,d.Xl)}else b.pc(b.Yb);!a.ZWriteEnabled||a.isTransparent()?b.Wc(false):b.Wc(true);a.ZReadEnabled?b.Xc(b.td):b.pc(b.td)}if(a.Tex1&&a.Tex1.ec){b.Uc(b.fh);b.nb(b.T,a.Tex1.Qa);b.Xb(b.T,b.yj,a.ClampTexture1?b.we:b.Cl);b.Xb(b.T,b.zj,a.ClampTexture1?b.we:b.Cl)}else{b.Uc(b.fh);b.nb(b.T,null)}d&&b.Tf(b.sc(d,"texture1"),0);if(a.Bb&&a.Bb.ec){b.Uc(b.gh);b.nb(b.T,
a.Bb.Qa)}else{b.Uc(b.gh);b.nb(b.T,null)}d&&b.Tf(b.sc(d,"texture2"),1)}}};
w.vf=function(a){if(a!=null)if(this.L!=null){if(a.RendererNativeArray==null){for(var b=this.L,d={},e=a.Vertices.length,f=new WebGLFloatArray(e*3),g=new WebGLFloatArray(e*3),j=new WebGLFloatArray(e*2),m=new WebGLFloatArray(e*2),l=0;l<e;++l){var n=a.Vertices[l];f[l*3+0]=n.Pos.X;f[l*3+1]=n.Pos.Y;f[l*3+2]=n.Pos.Z;g[l*3+0]=n.Normal.X;g[l*3+1]=n.Normal.Y;g[l*3+2]=n.Normal.Z;j[l*2+0]=n.TCoords.X;j[l*2+1]=n.TCoords.Y;m[l*2+0]=n.TCoords2.X;m[l*2+1]=n.TCoords2.Y}e=a.Indices.length;l=new WebGLUnsignedShortArray(e);
for(n=0;n<e;n+=3){l[n+0]=a.Indices[n+0];l[n+1]=a.Indices[n+2];l[n+2]=a.Indices[n+1]}d.Ek=b.pb();b.pa(b.fa,d.Ek);b.ob(b.fa,f,b.mb);d.Uk=b.pb();b.pa(b.fa,d.Uk);b.ob(b.fa,j,b.mb);d.Vk=b.pb();b.pa(b.fa,d.Vk);b.ob(b.fa,m,b.mb);d.Ck=b.pb();b.pa(b.fa,d.Ck);b.ob(b.fa,g,b.mb);b.pa(b.fa,null);d.vk=b.pb();b.pa(b.Ib,d.vk);b.ob(b.Ib,l,b.mb);d.Jm=e;b.pa(b.Ib,null);a.RendererNativeArray=d}a=a.RendererNativeArray;b=this.L;b.qc(0);b.qc(1);b.qc(2);b.qc(3);b.pa(b.fa,a.Ek);b.yc(0,3,b.cc,false,0,0);b.pa(b.fa,a.Uk);b.yc(1,
2,b.cc,false,0,0);b.pa(b.fa,a.Vk);b.yc(2,2,b.cc,false,0,0);b.pa(b.fa,a.Ck);b.yc(3,3,b.cc,false,0,0);b.pa(b.Ib,a.vk);d=new Matrix4(false);this.Ja.F(d);d=d.ia(this.of);d=d.ia(this.ua);f=b.sc(this.ab,"worldviewproj");b.xn(f,false,new WebGLFloatArray(d.Nj()));b.wh(b.hh,a.Jm,b.mh,0)}};
w.uh=function(a,b,d,e,f,g){if(!(d<=0||e<=0||this.width==0||this.height==0)){var j=true;if(g==null||g==false)j=false;g=this.L;g.qc(0);g.ee(1);g.ee(2);g.ee(3);b=this.height-b;var m=2/this.width,l=2/this.height;a=a*m-1;b=b*l-1;d*=m;e*=l;m=new WebGLFloatArray(12);m[0]=a;m[1]=b;m[2]=0;m[3]=a+d;m[4]=b;m[5]=0;m[6]=a+d;m[7]=b-e;m[8]=0;m[9]=a;m[10]=b-e;m[11]=0;a=new WebGLUnsignedShortArray(6);a[0]=0;a[1]=2;a[2]=1;a[3]=0;a[4]=3;a[5]=2;b=g.pb();g.pa(g.fa,b);g.ob(g.fa,m,g.mb);g.yc(0,3,g.cc,false,0,0);d=g.pb();
g.pa(g.Ib,d);g.ob(g.Ib,a,g.mb);this.ab=this.Xi;g.ed(this.ab);g.Yk(g.sc(this.ab,"vColor"),Core.Ef(f)/255,Core.Cf(f)/255,Core.yf(f)/255,j?Core.Ah(f)/255:1);g.Wc(false);g.pc(g.td);if(j){g.Xc(g.Yb);g.rf(g.We,g.Le)}else g.pc(g.Yb);g.wh(g.hh,6,g.mh,0);g.ce(b);g.ce(d)}};
w.tf=function(a,b,d,e,f,g,j){if(!(f==null||f.Kf()==false||d<=0||e<=0||this.width==0||this.height==0)){var m=true;if(g==null||g==false)m=false;g=this.L;g.qc(0);g.qc(1);g.ee(2);g.ee(3);b=this.height-b;var l=2/this.width,n=2/this.height;a=a*l-1;b=b*n-1;d*=l;e*=n;l=new WebGLFloatArray(12);l[0]=a;l[1]=b;l[2]=0;l[3]=a+d;l[4]=b;l[5]=0;l[6]=a+d;l[7]=b-e;l[8]=0;l[9]=a;l[10]=b-e;l[11]=0;d=new WebGLFloatArray(8);d[0]=0;d[1]=0;d[2]=1;d[3]=0;d[4]=1;d[5]=1;d[6]=0;d[7]=1;a=new WebGLUnsignedShortArray(6);a[0]=0;
a[1]=2;a[2]=1;a[3]=0;a[4]=3;a[5]=2;b=g.pb();g.pa(g.fa,b);g.ob(g.fa,l,g.mb);g.yc(0,3,g.cc,false,0,0);e=g.pb();g.pa(g.fa,e);g.ob(g.fa,d,g.mb);g.yc(1,2,g.cc,false,0,0);d=g.pb();g.pa(g.Ib,d);g.ob(g.Ib,a,g.mb);this.ab=j==null?this.Yi:j;g.ed(this.ab);g.Wc(false);g.pc(g.td);if(m){g.Xc(g.Yb);g.rf(g.We,g.Le)}else g.pc(g.Yb);g.Uc(g.fh);g.nb(g.T,f.Nh());g.Xb(g.T,g.yj,g.we);g.Xb(g.T,g.zj,g.we);g.Uc(g.gh);g.nb(g.T,null);g.wh(g.hh,6,g.mh,0);g.ce(e);g.ce(b);g.ce(d)}};
function wa(a,b,d,e,f,g,j){if(!(g==null||g.Kf()==false||e<=0||f<=0||a.width==0||a.height==0)){var m=a.L;a.ab=a.Sg;m.ed(a.ab);m.Yk(m.sc(a.ab,"vColor"),Core.Ef(j)/255,Core.Cf(j)/255,Core.yf(j)/255,Core.Ah(j)/255);a.tf(b,d,e,f,g,true,a.Sg)}}Renderer.prototype.Pj=function(a){if(this.L!=null){xa(this);var b=this.L;b.Wc(true);b.Rj(Core.Ef(a)/255,Core.Cf(a)/255,Core.yf(a)/255,1);b.clear(b.cl|b.el)}};Renderer.prototype.Xj=function(){this.L!=null&&this.L.im()};Renderer.prototype.Sj=h();
function xa(a){if(!(a.canvas==null||a.L==null))if(!(a.width==a.canvas.width&&a.height==a.canvas.height)){a.width=a.canvas.width;a.height=a.canvas.height;var b=a.L;b.Zk&&b.Zk(0,0,a.width,a.height)}}
Renderer.prototype.ra=function(a){this.canvas=a;this.L=null;try{a=["webgl","experimental-webgl","moz-webgl","webkit-3d","3d"];for(var b=0;b<a.length;b++)try{this.L=this.canvas.getContext(a[b]);if(this.L!=null)break}catch(d){}}catch(e){}if(this.L==null){y(C,"Error: This browser does not support WebGL (or it is disabled).");y(C,"See www.ambiera.com/copperlicht/browsersupport.html for details.");return false}else{if(typeof WebGLFloatArray=="undefined"&&typeof Float32Array!="undefined")try{WebGLFloatArray=
Float32Array;WebGLUnsignedShortArray=Uint16Array}catch(f){y(C,"Error: Float32 array types for webgl not found.")}if(typeof WebGLFloatArray=="undefined"&&typeof CanvasFloatArray!="undefined")try{WebGLFloatArray=CanvasFloatArray;WebGLUnsignedShortArray=CanvasUnsignedShortArray}catch(g){y(C,"Error: canvas array types for webgl not found.")}a=this.L;a.getProgramParameter||(a.getProgramParameter=a.getProgrami);a.getShaderParameter||(a.getShaderParameter=a.getShaderi);a=this.L;a.Uc=a.activeTexture;a.Oj=
a.attachShader;a.rf=a.blendFunc;a.qf=a.bindAttribLocation;a.pa=a.bindBuffer;a.nb=a.bindTexture;a.ob=a.bufferData;a.Rj=a.clearColor;a.am=a.clearDepth;a.fm=a.createShader;a.dm=a.createProgram;a.pb=a.createBuffer;a.bm=a.compileShader;a.Uj=a.createTexture;a.gm=a.cullFace;a.wh=a.drawElements;a.pc=a.disable;a.ce=a.deleteBuffer;a.de=a.deleteBuffer;a.Wc=a.depthMask;a.Xc=a.enable;a.qc=a.enableVertexAttribArray;a.ee=a.disableVertexAttribArray;a.ak=a.generateMipmap;a.yc=a.vertexAttribPointer;a.im=a.flush;a.Am=
a.getProgramParameter;a.Em=a.getShaderParameter;a.Dm=a.getShaderInfoLog;a.zm=a.getProgramInfoLog;a.sc=a.getUniformLocation;a.Om=a.linkProgram;a.ed=a.useProgram;a.Tf=a.uniform1i;a.xn=a.uniformMatrix4fv;a.Yk=a.uniform4f;a.Zk=a.viewport;a.tn=a.shaderSource;a.Tk=a.texImage2D;a.Xb=a.texParameteri;a.fa=a.ARRAY_BUFFER;a.bl=a.BACK;a.Yb=a.BLEND;a.si=a.COMPILE_STATUS;a.cl=a.COLOR_BUFFER_BIT;a.si=a.COMPILE_STATUS;a.we=a.CLAMP_TO_EDGE;a.dl=a.CULL_FACE;a.el=a.DEPTH_BUFFER_BIT;a.td=a.DEPTH_TEST;a.Ib=a.ELEMENT_ARRAY_BUFFER;
a.cc=a.FLOAT;a.kl=a.FRAGMENT_SHADER;a.Ii=a.LINEAR;a.Ji=a.LINEAR_MIPMAP_NEAREST;a.ul=a.LINK_STATUS;a.Ql=a.UNSIGNED_BYTE;a.mh=a.UNSIGNED_SHORT;a.Fj=a.VERTEX_SHADER;a.Le=a.ONE_MINUS_SRC_ALPHA;a.zl=a.ONE_MINUS_SRC_COLOR;a.yl=a.ONE;a.aj=a.RGBA;a.We=a.SRC_ALPHA;a.mb=a.STATIC_DRAW;a.fh=a.TEXTURE0;a.gh=a.TEXTURE1;a.T=a.TEXTURE_2D;a.wj=a.TEXTURE_MAG_FILTER;a.xj=a.TEXTURE_MIN_FILTER;a.zj=a.TEXTURE_WRAP_T;a.yj=a.TEXTURE_WRAP_S;a.hh=a.TRIANGLES;a=this.L;b=Q(this,this.qe,this.xf);var j=Q(this,this.qe,this.km),
m=Q(this,this.qe,this.lm),l=Q(this,this.qe,this.xf,true,a.We,a.Le),n=Q(this,this.qe,this.xf,true,a.yl,a.zl);this.Xi=Q(this,this.yn,this.mm);this.Yi=Q(this,this.$k,this.xf);this.Sg=Q(this,this.$k,this.jm);this.Wa[Material.rg]=b;this.Wa[Material.rg+1]=b;this.Wa[Material.wd]=j;this.Wa[Material.wd+1]=j;this.Wa[Material.wd+2]=j;this.Wa[Material.wd+3]=m;this.Wa[Material.sg]=n;this.Wa[Material.tg]=l;a.ed(b);this.ab=b;a.Rj(0,0,1,1);a.am(1E4);a.Wc(true);a.Xc(a.td);a.pc(a.Yb);a.rf(a.We,a.Le);a.Xc(a.dl);a.gm(a.bl);
xa(this)}return true};function ya(a,b,d){a=a.L;var e=a.fm(b);if(e==null)return null;a.tn(e,d);a.bm(e);if(!a.Em(e,a.si)){y(C,"Error loading "+(b==a.Fj?"vertex":"fragment")+" shader: "+a.Dm(e));return null}return e}Renderer.prototype.cm=function(a,b,d,e,f){a=Q(this,a,b,d,e,f);if(!a)return-1;this.Ig+=1;this.Wa[this.Ig]=a;return this.Ig};Renderer.prototype.tm=function(a){var b=null;try{b=this.Wa[a]}catch(d){}return b};
function Q(a,b,d,e,f,g){var j;j=a.L;b=ya(a,j.Fj,b);a=ya(a,j.kl,d);if(!b||!a){C.print("Could not create shader program");j=null}else{d=j.dm();j.Oj(d,b);j.Oj(d,a);j.qf(d,0,"vPosition");j.qf(d,1,"vTexCoord1");j.qf(d,2,"vTexCoord2");j.qf(d,3,"vNormal");j.Om(d);if(j.Am(d,j.ul)){j.ed(d);j.Tf(j.sc(d,"texture1"),0);j.Tf(j.sc(d,"texture2"),1)}else C.print("Could not link program:"+j.zm(d));j=d}if(j){j.Yl=e?e:false;j.Zl=f;j.Xl=g}return j}w=Renderer.prototype;w.Ok=function(a){a.F(this.Ja)};w.ok=s("Ja");
w.Sk=function(a){a.F(this.of)};w.uk=s("of");w.Oh=s("ua");w.gb=function(a){a&&a.F(this.ua)};w.de=function(a){if(a!=null){this.L.de(a.Nh());a.Qa=null;a.ec=false}};w.Vj=function(a){var b=this.L,d=b.Uj();b.nb(b.T,d);var e=a.width,f=a.height;ta(this,d,a);b.Xb(b.T,b.wj,b.Ii);b.Xb(b.T,b.xj,b.Ji);b.ak(b.T);b.nb(b.T,null);a=new Texture;a.Name="";a.Qa=d;a.jb=null;a.ec=true;a.gg=e;a.fg=f;return a};function sa(a,b){--b;for(a=1;a<32;a<<=1)b|=b>>a;return b+1}
function ta(a,b,d){a=a.L;try{a.Tk(a.T,0,a.aj,a.aj,a.Ql,d)}catch(e){a.Tk(a.T,0,d)}}w=Renderer.prototype;w.yn="\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tattribute vec4 vPosition;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t        gl_Position = vPosition;\t\t\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
w.$k="\t\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tattribute vec4 vPosition;\t\t\t\t\t\t\t\t\t\tattribute vec4 vTexCoord1;\t\t\t\t\t\t\t\t\t\tvarying vec2 v_texCoord1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t        gl_Position = vPosition;\t\t\t\t\t\t\t\t\t\tv_texCoord1 = vTexCoord1.st;\t\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
w.mm="\t\t\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tuniform vec4 vColor;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t         gl_FragColor = vColor;\t\t\t\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";w.jm="\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tuniform vec4 vColor;\t\t\t\t\t\t\t\t\t\t\tuniform sampler2D texture1;\t\t\t\t\t\t\t\t\t\tuniform sampler2D texture2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    varying vec2 v_texCoord1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    vec2 texCoord = vec2(v_texCoord1.s, v_texCoord1.t);\t\t        float alpha = texture2D(texture1, texCoord).r;\t\t        gl_FragColor = vec4(vColor.rgb, alpha);\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
w.qe="\t\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tuniform mat4 worldviewproj;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tattribute vec4 vPosition;\t\t\t\t\t\t\t\t\t    attribute vec4 vNormal;\t\t\t\t\t\t\t\t\t\t    attribute vec2 vTexCoord1;\t\t\t\t\t\t\t\t\t\tattribute vec2 vTexCoord2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    varying vec2 v_texCoord1;\t\t\t\t\t\t\t\t\t\tvarying vec2 v_texCoord2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t        gl_Position = worldviewproj * vPosition;\t\t\t\t        v_texCoord1 = vTexCoord1.st;\t\t\t\t\t\t\t\t\tv_texCoord2 = vTexCoord2.st;\t\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
w.xf="\t\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tuniform sampler2D texture1;\t\t\t\t\t\t\t\t\t\tuniform sampler2D texture2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    varying vec2 v_texCoord1;\t\t\t\t\t\t\t\t\t\tvarying vec2 v_texCoord2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t        vec2 texCoord = vec2(v_texCoord1.s, v_texCoord1.t);\t\t        gl_FragColor = texture2D(texture1, texCoord);\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
w.km="\t\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tuniform sampler2D texture1;\t\t\t\t\t\t\t\t\t\tuniform sampler2D texture2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    varying vec2 v_texCoord1;\t\t\t\t\t\t\t\t\t\tvarying vec2 v_texCoord2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t        vec2 texCoord1 = vec2(v_texCoord1.s, v_texCoord1.t);\t\t\tvec2 texCoord2 = vec2(v_texCoord2.s, v_texCoord2.t);\t        vec4 col1 = texture2D(texture1, texCoord1);\t\t\t\t\t\tvec4 col2 = texture2D(texture2, texCoord2);\t\t\t\t\t\tgl_FragColor = col1 * col2;\t\t\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
w.lm="\t\t\t\t\t#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\t\t\n\tprecision highp float;\t\t\t\t\t\t\t\t\t\t\n\t#endif\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tuniform sampler2D texture1;\t\t\t\t\t\t\t\t\t\tuniform sampler2D texture2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    varying vec2 v_texCoord1;\t\t\t\t\t\t\t\t\t\tvarying vec2 v_texCoord2;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    void main()\t\t\t\t\t\t\t\t\t\t\t\t\t    {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t        vec2 texCoord1 = vec2(v_texCoord1.s, v_texCoord1.t);\t\t\tvec2 texCoord2 = vec2(v_texCoord2.s, v_texCoord2.t);\t        vec4 col1 = texture2D(texture1, texCoord1);\t\t\t\t\t\tvec4 col2 = texture2D(texture2, texCoord2);\t\t\t\t\t\tgl_FragColor = col1 * col2 * 3.0;\t\t\t\t\t\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";function za(a,b){a=new CopperLicht(a,true);a.load(b);return a}
CopperLicht=function(a,b,d){if((b==null||b==true)&&C==null)C=new DebugOutput(a);this.jl=a;this.Kb=document.getElementById(this.jl);this.V=new CCDocument;this.$=null;this.rl=false;this.Lc=null;this.Za=new TextureManager;this.Je=false;this.Mi=0;this.FPS=60;this.OnLoadingComplete=this.OnAfterDrawAll=this.OnBeforeDrawAll=this.OnAnimate=null;this.Te=[];this.hj=[];this.Jg=false;this.Pi=this.Oi=this.Ri=this.Qi=0;if(d)this.FPS=d;var e=this;setInterval(function(){if(C){++e.Mi;var f=0,g=0;if(e.Za){f=e.Za.ck();
g=e.Za.sk()}if(e.Je||f){var j="Loading";if(f>0)j="Textures loaded: "+(g-f)+"/"+g;switch(e.Mi%4){case 0:j+="   ";break;case 1:j+=".  ";break;case 2:j+=".. ";break;case 3:j+="...";break}ba(C,j)}else ba(C,null)}},500)};CopperLicht.prototype.Km=function(){return Aa(this)};CopperLicht.prototype.pk=s("$");CopperLicht.prototype.Yc=function(){if(this.V==null)return null;return this.V.Af()};
function Ba(a){document.onkeydown=function(d){a.handleKeyDown(d)};document.onkeyup=function(d){a.handleKeyUp(d)};var b=a.Kb;if(b!=null){b.onmousemove=function(d){a.handleMouseMove(d)};b.onmousedown=function(d){a.handleMouseDown(d)};b.onmouseup=function(d){a.handleMouseUp(d)}}}CopperLicht.prototype.load=function(a){if(!Aa(this))return false;var b=this;this.Je=true;(new CCFileLoader(a)).load(function(d){b.Xh(d,a)})};
function Aa(a){if(a.$!=null)return true;var b=a.Kb;if(b==null)return false;a.$=new Renderer;if(a.$.ra(b)==false)return false;if(a.Za)a.Za.$=a.$;Ba(a);setInterval(function(){a.vh()},1E3/a.FPS);return true}w=CopperLicht.prototype;w.Mm=s("Je");w.Xh=function(a,b){this.Je=false;a=(new FlaceLoader).Pm(a,b,this.Za,this);if(a!=null){this.V=a;this.Hf(a.Af());this.vh();this.OnLoadingComplete!=null&&this.OnLoadingComplete()}};
w.vh=function(){if(!(this.V==null||this.$==null)){Ca(this);var a=this.V.Af();if(!this.rl&&a){this.OnAnimate&&this.OnAnimate();var b;var d=this.$;a.Li=d;if(a.ma=0)a.ma=F();a.Ol=null;b=a.ta.OnAnimate(a,F());var e;if(a.Ta){e=new Matrix4(false);a.Ta.Ja.F(e);e=e.ia(a.Ta.Tc);e=!e.t(a.Bd)}else e=true;d=d?va(d):false;if(a.xg||a.Se==0&&(e||d)||a.Se==1&&(e||b||d)||a.Se==2){a.xg=false;b=true}else b=false;if(b){this.$.Pj(a.ue);this.OnBeforeDrawAll&&this.OnBeforeDrawAll();Da(a,this.$);this.OnAfterDrawAll&&this.OnAfterDrawAll();
this.$.Xj()}}Ca(this)}};w.Cm=function(){if(this.V)return this.V.zb;return 0};w.qh=function(a){if(this.V){this.V.zb.push(a);this.V.zb.length==1&&this.V.Kk(a)}};function ea(a,b,d){if(!a.V)return false;var e=a.V.zb;b=b;if(d)b=b.toLowerCase();for(var f=0;f<e.length;++f){var g=e[f].Name;if(d)g=g.toLowerCase();if(b==g){a.Hf(e[f]);return}}}
CopperLicht.prototype.Hf=function(a){if(!a)return false;var b=a.Ff()=="panorama",d=a.Ff()=="free",e=null;this.V.Kk(a);if(a.Kj)a.Ea();else{a.Kj=true;var f=false,g=a.zh("camera");if(g)for(var j=0;j<g.length;++j){var m=g[j];if(m&&m.oi){e=m;f=true;R(e,this.$.width,this.$.height);break}}if(!f){f=4/3;if(this.$.width&&this.$.height)f=this.$.width/this.$.height;e=new CameraSceneNode;e.Qf(f);a.ta.Da(e);f=null;if(!b){f=new AnimatorCameraFPS(e,this);e.Vc(f)}if(d){if(a.qg!=null)e.Pos=a.qg.b();if(a.ze!=null)f!=
null?f.Uh(a.ze):e.Ub(a.ze)}f&&Ea(f,!b)}a.Pf(e);a.lg=Fa(a,true);Ga(this,a.je(),a.lg)}a.Pk(this.V.Rl);a.Zj();return true};function Ca(a){if(a.Lc!=null){var b=a.V.Af();if(b!=null)if(a.Lc.ea===b){TheRenderer&&R(a.Lc,TheRenderer.fb(),TheRenderer.eb());b.Pf(a.Lc);a.Lc=null}}}w=CopperLicht.prototype;w.handleKeyDown=function(a){var b=this.Yc();if(b!=null){b=b.Ea();b!=null&&b.onKeyDown(a);for(b=0;b<this.Te.length;++b)this.hj[b].onKeyDown(a)}};
w.handleKeyUp=function(a){var b=this.Yc();if(b!=null){b=b.Ea();b!=null&&b.onKeyUp(a);for(b=0;b<this.Te.length;++b)this.Te[b].onKeyUp(a)}};w.handleMouseDown=function(a){this.Jg=true;if(a){this.Oi=a.clientX-this.Kb.offsetLeft+document.body.scrollLeft;this.Pi=a.clientY-this.Kb.offsetTop+document.body.scrollTop}var b=this.Yc();if(b!=null){var d=b.Ea();d!=null&&d.onMouseDown(a);for(d=0;d<b.ic.length;++d)b.ic[d].onMouseDown(a)}};w.he=s("Qi");w.ie=s("Ri");w.Lf=s("Jg");w.Dh=s("Oi");w.Eh=s("Pi");
w.handleMouseUp=function(a){this.Jg=false;var b=this.Yc();if(b!=null){var d=b.Ea();d!=null&&d.onMouseUp(a);for(d=0;d<b.ic.length;++d)b.ic[d].onMouseUp(a)}};w.handleMouseMove=function(a){if(a){this.Qi=a.clientX-this.Kb.offsetLeft+document.body.scrollLeft;this.Ri=a.clientY-this.Kb.offsetTop+document.body.scrollTop}var b=this.Yc();if(b!=null){b=b.Ea();b!=null&&b.onMouseMove(a)}};w.OnAnimate=null;w.OnAfterDrawAll=null;w.OnBeforeDrawAll=null;w.OnLoadingComplete=null;
w.bk=function(a,b){var d=this.$;if(d==null)return null;var e=d.ok(),f=d.uk();if(e==null||f==null)return null;e=e.ia(f);var g=new ViewFrustrum;g.bi(e);e=new Vect3d;g.ja[ViewFrustrum.mf].Df(g.ja[ViewFrustrum.oh],g.ja[ViewFrustrum.nh],e);f=new Vect3d;g.ja[ViewFrustrum.mf].Df(g.ja[ViewFrustrum.oh],g.ja[ViewFrustrum.Ij],f);f=f.c(e);var j=new Vect3d;g.ja[ViewFrustrum.mf].Df(g.ja[ViewFrustrum.Gj],g.ja[ViewFrustrum.nh],j);g=j.c(e);j=d.fb();d=d.eb();b=b/d;return e.add(f.w(a/j)).add(g.w(b))};
w.nm=function(a){var b=new Matrix4(false),d=this.$;if(!d.Ja)return null;d.Ja.F(b);b=b.ia(d.of);var e=d.fb()/2;d=d.eb()/2;if(d==0||e==0)return null;a=new Vect3d(a.X,a.Y,a.Z);a.W=1;b.Bk(a);b=a.W==0?1:1/a.W;if(a.Z<0)return null;var f=new Vect2d;f.X=e*a.X*b+e;f.Y=d-d*a.Y*b;return f};function fa(a,b){if(b!=null)a.Lc=b}CopperLicht.prototype.Gm=s("Za");
function Ga(a,b,d){if(b){for(var e=0;e<b.J.length;++e){var f=b.J[e];if(f)if(f.getType()=="collisionresponse")f.gb(d);else if(f.getType()=="onclick")f.ua=d;else if(f.getType()=="gameai")f.ua=d}for(e=0;e<b.B.length;++e)(f=b.B[e])&&Ga(a,f,d)}};SceneNode=function(){this.Type=-1;this.Pos=new Vect3d;this.Rot=new Vect3d;this.Scale=new Vect3d(1,1,1);this.Visible=true;this.Name="";this.Na=0;this.Id=-1;this.Parent=null;this.B=[];this.J=[];this.S=new Matrix4;this.Ya=this.ea=null};w=SceneNode.prototype;w.ra=function(){this.Pos=new Vect3d;this.Rot=new Vect3d;this.Scale=new Vect3d(1,1,1);this.B=[];this.J=[];this.S=new Matrix4};w.Pos=null;w.Rot=null;w.Scale=null;w.Visible=true;w.Name="";w.Id=-1;w.Ya=null;w.Parent=null;w.ym=s("Parent");w.getType=v("none");
w.getBoundingBox=function(){return new Box3d};w.om=s("J");w.Rb=function(a){for(i=0;i<this.J.length;++i){var b=this.J[i];if(b.getType()==a)return b}return null};w.Ra=function(){var a=this.getBoundingBox().b();this.S.oe(a);return a};
function S(a,b,d){b.Name=new String(a.Name);b.Visible=a.Visible;b.Na=a.Na;b.Pos=a.Pos.b();b.Rot=a.Rot.b();b.Scale=a.Scale.b();b.Type=a.Type;d&&d.Da(b);for(d=0;d<a.B.Vn;++d){var e=a.B[d];if(e){e=e.createClone(b);e!=null&&b.Da(e)}}b.J=a.J.slice();if(a.S)b.S=a.S.b();b.ea=a.ea}w=SceneNode.prototype;w.createClone=v(null);w.Vc=function(a){a!=null&&this.J.push(a)};w.Gk=function(a){if(a!=null){var b;for(b=0;b<this.J.length;++b)if(this.J[b]===a){this.J.splice(b,1);return}}};
w.Da=function(a){if(a){a.ea=this.ea;a.Parent&&a.Parent.removeChild(a);a.Parent=this;this.B.push(a)}};w.removeChild=function(a){for(var b=0;b<this.B.length;++b)if(this.B[b]===a){a.Parent=null;this.B.splice(b,1);return}};w.OnRegisterSceneNode=function(a){if(this.Visible)for(var b=0;b<this.B.length;++b)this.B[b].OnRegisterSceneNode(a)};
w.OnAnimate=function(a,b){var d=false;if(this.Visible){var e,f=this.J.length;for(e=0;e<f;){d=this.J[e].animateNode(this,b)||d;var g=f;f=this.J.length;g>=f&&++e}this.Ba();for(e=0;e<this.B.length;++e)d=this.B[e].OnAnimate(a,b)||d}return d};w.Ih=function(){var a=new Matrix4;a.wc(this.Rot);a.ii(this.Pos);if(this.Scale.X!=1||this.Scale.Y!=1||this.Scale.Z!=1){var b=new Matrix4;b.gi(this.Scale);a=a.ia(b)}return a};w.Ba=function(){this.S=this.Parent!=null?this.Parent.S.ia(this.Ih()):this.Ih()};w.render=h();
w.yh=s("S");w.aa=function(){return this.S.tk()};w.getMaterialCount=v(0);w.getMaterial=v(null);CameraSceneNode=function(){this.ra();this.Box=new Box3d;this.oi=this.Oa=false;this.Pa=new Vect3d(0,0,10);this.Ob=new Vect3d(0,1,0);this.Ja=new Matrix4;this.Tc=new Matrix4;this.Jb=Core.PI/2.5;this.Va=4/3;this.Qb=0.1;this.Pb=3E3;this.Ja.sh(this.Jb,this.Va,this.Qb,this.Pb)};CameraSceneNode.prototype=new SceneNode;function T(a){a.Ja.sh(a.Jb,a.Va,a.Qb,a.Pb)}w=CameraSceneNode.prototype;w.getType=v("camera");w.Qf=function(a){if(!Core.t(this.Va,a)){this.Va=a;T(this)}};w.pm=s("Va");w.ek=s("Jb");
w.Lk=function(a){if(!Core.t(this.Jb,a)){this.Jb=a;T(this)}};w.Ub=function(a){if(a)this.Pa=a.b()};w.qb=s("Pa");w.Mh=s("Ob");w.sn=function(a){if(a)this.Ob=a.b()};w.mk=s("Qb");w.nn=function(a){if(!Core.t(this.Qb,a)){this.Qb=a;T(this)}};w.dk=s("Pb");w.jn=function(a){if(!Core.t(this.Pb,a)){this.Pb=a;T(this)}};w.OnAnimate=function(a,b){a=SceneNode.prototype.OnAnimate.call(this,a,b);Ha(this);return a};function Ha(a){var b=a.aa(),d=a.Pa.b();if(b.t(d))d.X+=1;a.Tc.Qj(a.Pos,d,a.Ob)}w=CameraSceneNode.prototype;
w.OnRegisterSceneNode=function(a){if(a.Ea()===this){a.Fb(this,2);SceneNode.prototype.OnRegisterSceneNode.call(this,a)}};w.render=function(a){Ha(this);if(this.Va==0){R(this,a.width,a.height);this.Va==0&&this.Qf(0.75)}a.Ok(this.Ja);a.Sk(this.Tc)};w.onMouseDown=function(a){for(var b=0;b<this.J.length;++b)this.J[b].onMouseDown(a)};w.onMouseUp=function(a){for(var b=0;b<this.J.length;++b)this.J[b].onMouseUp(a)};w.onMouseMove=function(a){for(var b=0;b<this.J.length;++b)this.J[b].onMouseMove(a)};
w.onKeyDown=function(a){for(var b=0;b<this.J.length;++b)this.J[b].onKeyDown(a)};w.onKeyUp=function(a){for(var b=0;b<this.J.length;++b)this.J[b].onKeyUp(a)};w.createClone=function(a){var b=new CameraSceneNode;cloneMembers(b,a);if(Target)b.Pa=this.Pa.b();if(UpVector)b.Ob=this.Ob.b();if(Projection)b.Ja=this.Ja.b();if(ViewMatrix)b.Tc=this.Tc.b();b.Jb=this.Jb;b.Va=this.Va;b.Qb=this.Qb;b.Pb=this.Pb;if(Box)b.Box=this.Box.b();return b};function R(a,b,d){b==0||d==0||Core.t(a.Va,0)&&a.Qf(b/d)};MeshSceneNode=function(){this.ra();this.Box=new Box3d;this.Oa=false;this.u=null;this.In=true;this.Ya=null};MeshSceneNode.prototype=new SceneNode;w=MeshSceneNode.prototype;w.getBoundingBox=function(){if(this.u)return this.u.Box;return this.Box};w.kk=s("u");w.ei=o("u");w.getType=v("mesh");
w.OnRegisterSceneNode=function(a){var b=this.u;if(this.Visible&&b){for(var d=false,e=false,f=0;f<b.ha.length;++f)if(b.ha[f].Mat.isTransparent())d=true;else e=true;d&&a.Fb(this,Scene.Md);e&&a.Fb(this,Scene.hc);SceneNode.prototype.OnRegisterSceneNode.call(this,a)}};w.render=function(a){a.gb(this.S);a.uf(this.u)};w.getMaterialCount=function(){if(this.u)return this.u.ha.length;return 0};w.getMaterial=function(a){if(this.u!=null)if(a>=0&&a<this.u.ha.length)return this.u.ha[a].Mat;return null};
w.createClone=function(a){var b=new MeshSceneNode;S(this,b,a);b.u=this.u;b.Od=this.Od;b.Oa=this.Oa;if(this.Box)b.Box=this.Box.b();return b};SkyBoxSceneNode=function(){this.u=new Mesh;var a=[0,1,2,0,2,3],b=new MeshBuffer;this.u.Ua(b);b.Mat.ClampTexture1=true;b.Indices=a;b.Vertices.push(this.v(-1,-1,-1,0,0,1,1,1));b.Vertices.push(this.v(1,-1,-1,0,0,1,0,1));b.Vertices.push(this.v(1,1,-1,0,0,1,0,0));b.Vertices.push(this.v(-1,1,-1,0,0,1,1,0));b=new MeshBuffer;this.u.Ua(b);b.Mat.ClampTexture1=true;b.Indices=a;b.Vertices.push(this.v(1,-1,-1,-1,0,0,1,1));b.Vertices.push(this.v(1,-1,1,-1,0,0,0,1));b.Vertices.push(this.v(1,1,1,-1,0,0,0,0));b.Vertices.push(this.v(1,
1,-1,-1,0,0,1,0));b=new MeshBuffer;this.u.Ua(b);b.Mat.ClampTexture1=true;b.Indices=a;b.Vertices.push(this.v(-1,-1,1,1,0,0,1,1));b.Vertices.push(this.v(-1,-1,-1,1,0,0,0,1));b.Vertices.push(this.v(-1,1,-1,1,0,0,0,0));b.Vertices.push(this.v(-1,1,1,1,0,0,1,0));b=new MeshBuffer;this.u.Ua(b);b.Mat.ClampTexture1=true;b.Indices=a;b.Vertices.push(this.v(1,-1,1,0,0,-1,1,1));b.Vertices.push(this.v(-1,-1,1,0,0,-1,0,1));b.Vertices.push(this.v(-1,1,1,0,0,-1,0,0));b.Vertices.push(this.v(1,1,1,0,0,-1,1,0));b=new MeshBuffer;
this.u.Ua(b);b.Mat.ClampTexture1=true;b.Indices=a;b.Vertices.push(this.v(1,1,-1,0,-1,0,1,1));b.Vertices.push(this.v(1,1,1,0,-1,0,0,1));b.Vertices.push(this.v(-1,1,1,0,-1,0,0,0));b.Vertices.push(this.v(-1,1,-1,0,-1,0,1,0));b=new MeshBuffer;this.u.Ua(b);b.Mat.ClampTexture1=true;b.Indices=a;b.Vertices.push(this.v(1,-1,1,0,1,0,1,1));b.Vertices.push(this.v(1,-1,-1,0,1,0,0,1));b.Vertices.push(this.v(-1,-1,-1,0,1,0,0,0));b.Vertices.push(this.v(-1,-1,1,0,1,0,1,0))};SkyBoxSceneNode.prototype=new MeshSceneNode;
w=SkyBoxSceneNode.prototype;w.getType=v("sky");w.v=function(a,b,d,e,f,g,j,m){e=new Vertex3D(true);e.Pos.X=a;e.Pos.Y=b;e.Pos.Z=d;e.TCoords.X=j;e.TCoords.Y=m;return e};w.OnRegisterSceneNode=function(a){if(this.Visible){a.Fb(this,1);SceneNode.prototype.OnRegisterSceneNode.call(this,a)}};w.render=function(a){var b=this.ea.Ea();if(b&&this.u){var d=new Matrix4(false);this.S.F(d);d.ii(b.aa());b=(b.mk()+b.dk())*0.5;var e=new Matrix4;e.gi(new Vect3d(b,b,b));a.gb(d.ia(e));a.uf(this.u)}};
w.createClone=function(a){var b=new SkyBoxSceneNode;S(this,b,a);if(OwnedMesh)b.u=this.u.b();b.Od=this.Od;b.Oa=this.Oa;if(this.Box)b.Box=this.Box.b();return b};CubeSceneNode=function(a){if(a==null)a=10;this.u=new Mesh;var b=new MeshBuffer;b.Indices=[0,2,1,0,3,2,1,5,4,1,2,5,4,6,7,4,5,6,7,3,0,7,6,3,9,5,2,9,8,5,0,11,10,0,10,7];this.u.Ua(b);var d=Core.Tj(255,255,255,255);b.Vertices.push(this.v(0,0,0,-1,-1,-1,d,0,1));b.Vertices.push(this.v(1,0,0,1,-1,-1,d,1,1));b.Vertices.push(this.v(1,1,0,1,1,-1,d,1,0));b.Vertices.push(this.v(0,1,0,-1,1,-1,d,0,0));b.Vertices.push(this.v(1,0,1,1,-1,1,d,0,1));b.Vertices.push(this.v(1,1,1,1,1,1,d,0,0));b.Vertices.push(this.v(0,
1,1,-1,1,1,d,1,0));b.Vertices.push(this.v(0,0,1,-1,-1,1,d,1,1));b.Vertices.push(this.v(0,1,1,-1,1,1,d,0,1));b.Vertices.push(this.v(0,1,0,-1,1,-1,d,1,1));b.Vertices.push(this.v(1,0,1,1,-1,1,d,1,0));b.Vertices.push(this.v(1,0,0,1,-1,-1,d,0,0));for(d=0;d<12;++d){var e=b.Vertices[d].Pos;e.Fa(a);e.X-=a*0.5;e.Y-=a*0.5;e.Z-=a*0.5}b.ad();this.u.Box=b.Box.b();this.ra()};CubeSceneNode.prototype=new MeshSceneNode;
CubeSceneNode.prototype.v=function(a,b,d,e,f,g,j,m,l){j=new Vertex3D(true);j.Pos.X=a;j.Pos.Y=b;j.Pos.Z=d;j.Normal.X=e;j.Normal.Y=f;j.Normal.Z=g;j.TCoords.X=m;j.TCoords.Y=l;return j};CubeSceneNode.prototype.createClone=function(a){var b=new CubeSceneNode;S(this,b,a);b.u=this.u;b.Od=this.Od;b.Oa=this.Oa;if(this.Box)b.Box=this.Box.b();return b};BillboardSceneNode=function(){this.ra();this.Box=new Box3d;this.mc=this.Rc=10;this.Fe=false;this.kb=new MeshBuffer;this.fd=new Vertex3D(true);this.gd=new Vertex3D(true);this.hd=new Vertex3D(true);this.jd=new Vertex3D(true);var a=this.kb.Indices;a.push(0);a.push(2);a.push(1);a.push(0);a.push(3);a.push(2);a=this.kb.Vertices;a.push(this.fd);a.push(this.gd);a.push(this.hd);a.push(this.jd);this.fd.TCoords.X=1;this.fd.TCoords.Y=1;this.gd.TCoords.X=1;this.gd.TCoords.Y=0;this.hd.TCoords.X=0;this.hd.TCoords.Y=
0;this.jd.TCoords.X=0;this.jd.TCoords.Y=1};BillboardSceneNode.prototype=new SceneNode;w=BillboardSceneNode.prototype;w.getBoundingBox=s("Box");w.getType=v("billboard");w.OnRegisterSceneNode=function(a){if(this.Visible){a.Fb(this,this.kb.Mat.isTransparent()?Scene.Md:Scene.hc);SceneNode.prototype.OnRegisterSceneNode.call(this,a)}};
w.render=function(a){var b=this.ea.Ea();if(b){var d=this.aa(),e=b.aa(),f=b.qb();b=b.Mh();e=f.c(e);e.normalize();f=b.Aa(e);f.La()==0&&f.Tb(b.Y,b.X,b.Z);f.normalize();f.Fa(0.5*this.Rc);b=f.Aa(e);b.normalize();b.Fa(0.5*this.mc);this.Fe&&b.Tb(0,-0.5*this.mc,0);e.Fa(1);this.fd.Pos.Vb(d);this.fd.Pos.R(f);this.fd.Pos.R(b);this.gd.Pos.Vb(d);this.gd.Pos.R(f);this.gd.Pos.xc(b);this.hd.Pos.Vb(d);this.hd.Pos.xc(f);this.hd.Pos.xc(b);this.jd.Pos.Vb(d);this.jd.Pos.xc(f);this.jd.Pos.R(b);this.kb.update();d=new Matrix4(true);
a.gb(d);a.Rf(this.kb.Mat);a.vf(this.kb)}};w.getMaterialCount=v(1);w.getMaterial=function(){return this.kb.Mat};w.createClone=function(a){var b=new BillboardSceneNode;S(this,b,a);if(this.Box)b.Box=this.Box.b();b.Rc=this.Rc;b.mc=this.mc;b.Fe=this.Fe;b.kb.Mat=this.kb.Mat.b();return b};w.Fm=function(){return new Vect2d(this.Rc,this.mc)};w.rn=function(a,b){this.Rc=a;this.mc=b};PathSceneNode=function(){this.ra();this.Box=new Box3d;this.Tightness=0;this.IsClosedCircle=false;this.Nodes=[]};PathSceneNode.prototype=new SceneNode;w=PathSceneNode.prototype;w.Tightness=0;w.IsClosedCircle=false;w.Nodes=[];w.getBoundingBox=s("Box");w.getType=v("path");
w.createClone=function(a){var b=new PathSceneNode;S(this,b,a);if(this.Box)b.Box=this.Box.b();b.Tightness=this.Tightness;b.IsClosedCircle=this.IsClosedCircle;b.Nodes=[];for(a=0;a<this.Nodes.length;++a)b.Nodes.push(this.Nodes[a].b());return b};w.nk=function(a){if(a<0||a>=this.Nodes.length)return new Vect3d(0,0,0);this.S||updateAbsolutePosition();a=this.Nodes[a];a=a.b();this.S.dd(a);return a};function U(a,b,d){if(a.IsClosedCircle)return b<0?d+b:b>=d?b-d:b;return b<0?0:b>=d?d-1:b}
PathSceneNode.prototype.Hh=function(a,b){var d=this.Nodes.length;if(this.IsClosedCircle)a*=d;else{a=Core.$a(a,0,1);a*=d-1}var e=new Vect3d;if(d==0)return e;if(d==1)return e;a=a;var f=Core.$j(a),g=Math.floor(a)%d,j=this.Nodes[U(this,g-1,d)];e=this.Nodes[U(this,g+0,d)];a=this.Nodes[U(this,g+1,d)];var m=this.Nodes[U(this,g+2,d)],l=2*f*f*f-3*f*f+1;d=-2*f*f*f+3*f*f;g=f*f*f-2*f*f+f;f=f*f*f-f*f;j=a.c(j);j.Fa(this.Tightness);m=m.c(e);m.Fa(this.Tightness);e=e.w(l);e.R(a.w(d));e.R(j.w(g));e.R(m.w(f));if(!b){this.S||
this.Ba();this.S.dd(e)}return e};Overlay2DSceneNode=function(a){this.ra();this.bb=a;this.Box=new Box3d;this.Jd=this.Hd=100;this.$e=this.Ze=50;this.Qe=this.Pe=0.5;this.bf=1/6;this.af=1/6;this.Pc=this.Qc=true;this.qd=0;this.Ud=this.Qa=null;this.Ue=true;this.vd=false;this.ef=1;this.dc=this.Ca="";this.ff=0;this.Me=this.De=this.Ne=this.Ee=this.Ng=this.te=false;this.Sd=this.Td=null;this.yi=this.zi="";this.mg=0};Overlay2DSceneNode.prototype=new SceneNode;w=Overlay2DSceneNode.prototype;w.getBoundingBox=s("Box");w.getType=v("2doverlay");
w.gn=function(a,b,d,e){this.Hd=a;this.Jd=b;this.Ze=d;this.$e=e;this.Qc=true};w.pn=function(a,b){this.Pc=a;if(c.Pc)this.qd=b};w.qn=o("Qa");w.hi=function(a){this.Ca=a;this.vd=this.Ca!=null&&this.Ca!=""};w.OnRegisterSceneNode=function(a){if(this.Visible){a.Fb(this,Scene.Re);SceneNode.prototype.OnRegisterSceneNode.call(this,a)}};
w.render=function(a){var b=Ia(this,true,a),d=false;if(this.bb!=null&&this.te){d=this.bb.he();var e=this.bb.ie();d=b.x<=d&&b.y<=e&&b.x+b.hb>=d&&b.y+b.Sa>=e}if(d&&this.Ne)a.uh(b.x,b.y,b.hb,b.Sa,this.De,true);else this.Pc&&a.uh(b.x,b.y,b.hb,b.Sa,this.qd,true);e=this.Qa;if(d&&this.Ud&&this.Me)e=this.Ud;if(e!=null&&e.Kf()){var f=e.fb(),g=e.eb();if(this.Ue){if(f&&g&&b.Sa&&b.hb){var j=b.hb;f=j*(g/f);if(f>b.Sa){g=b.Sa/f;j*=g;f*=g}b.hb=j;b.Sa=f;a.tf(b.x,b.y,b.hb,b.Sa,e,true)}}else a.tf(b.x,b.y,b.hb,b.Sa,e,
true)}if(this.vd&&this.dc&&this.Ca!=""){(e=this.Td==null||false)||(e=this.zi!=this.Ca||this.yi!=this.dc);if(e){Ja(this,a);e=document.createElement("canvas");if(e!=null){e.width=1;e.height=1;j=e.getContext("2d");if(j!=null){var m=this.dc;f=12;g="Arial";var l=false,n=false;if(m.indexOf("#fnt_")==0)m=m.substr(5);m=m.split(";");for(var p=0;p<m.length;++p){var t=m[p],k=t.toLowerCase();if(p==0)f=parseInt(k);else if(p==2)g=t;else if(p==3){if(k.indexOf("italic")!=-1)l=true}else if(p==4)if(k.indexOf("bold")!=
-1)n=true}m="";if(l)m+="italic ";if(n)m+="bold ";this.mg=f*96/72;m+=this.mg+"px ";m+=g;f=m;j.font=f;g=j.measureText(this.Ca);e.width=g.width;e.height=this.mg;j.fillStyle="rgba(0, 0, 0, 1)";j.fillRect(0,0,e.width,e.height);j.fillStyle="rgba(255, 255, 255, 1)";j.textBaseline="top";j.font=f;j.fillText(this.Ca,0,0);this.Sd=this.Td=e=a.Vj(e);this.zi=this.Ca;this.yi=this.dc}}}e=this.Td;j=this.ff;if(d){if(this.Sd)e=this.Sd;j=this.Ee}if(e)if(this.ef==0)wa(a,b.x,b.y,e.fb(),e.eb(),e,j);else{d=e.fb();f=e.eb();
wa(a,b.x+(b.hb-d)/2,b.y+(b.Sa-f)/2,d,f,e,j)}}else Ja(this,a)};function Ja(a,b){b.de(a.Td);b.de(a.Sd);a.Td=null;a.Sd=null}Overlay2DSceneNode.prototype.getMaterialCount=v(0);function Ia(a,b,d){b=d.fb();d=d.eb();var e={};if(a.Qc){e.x=a.Hd;e.y=a.Jd;e.hb=a.Ze;e.Sa=a.$e}else{e.x=a.Pe*b;e.y=a.Qe*d;e.hb=a.bf*b;e.Sa=a.af*d}return e}
Overlay2DSceneNode.prototype.createClone=function(a){var b=new Overlay2DSceneNode;S(this,b,a);b.Hd=this.Hd;b.Jd=this.Jd;b.Ze=this.Ze;b.$e=this.$e;b.Pe=this.Pe;b.Qe=this.Qe;b.bf=this.bf;b.af=this.af;b.Qc=this.Qc;b.Pc=this.Pc;b.qd=this.qd;b.Qa=this.Qa;b.Ud=this.Ud;b.Ue=this.Ue;b.vd=this.vd;b.ef=this.ef;b.Ca=this.Ca;b.dc=this.dc;b.ff=this.ff;b.te=this.te;b.Ng=this.Ng;b.Ee=this.Ee;b.Ne=this.Ne;b.De=this.De;b.Me=this.Me;return b};AnimatedMeshSceneNode=function(){this.ra();this.Box=new Box3d;this.Oa=false;this.Ya=this.la=null;this.Yd=this.Xd=this.zd=0;this.Xa=[];this.Ha=0.25;this.Hb=F();this.Ga=this.ga=this.yg=0;this.Fd=false;this.$b=0;this.Ke=60};AnimatedMeshSceneNode.prototype=new SceneNode;w=AnimatedMeshSceneNode.prototype;w.getBoundingBox=s("Box");w.lk=function(){if(this.la&&this.la.Kc)return this.la.Kc.length;return 0};w.wm=function(a){var b=this.lk();if(a>=0&&a<b)return this.la.Kc[a];return null};
w.bd=function(a){if(!this.la)return false;a=pa(this.la,a);if(!a)return false;this.cd(a.Begin,a.End);this.ai(a.FPS);return true};w.ei=function(a){if(a){this.la=a;this.Box=a.getBoundingBox();this.cd(0,Math.floor(a.tb))}};w.getType=v("animatedmesh");w.OnRegisterSceneNode=function(a){if(this.Visible&&this.la){a.Fb(this,Scene.hc);SceneNode.prototype.OnRegisterSceneNode.call(this,a)}};w.render=function(a){a.gb(this.S);a.uf(this.u)};w.getMaterialCount=function(){if(this.u)return this.u.ha.length;return 0};
w.getMaterial=function(a){if(this.Xa)if(a>=0&&a<this.Xa.length)return this.Xa[a];else if(this.la&&this.la.sb&&a>=0&&this.Xa.length==a&&a<256){a=new Material;this.Xa.push(a);return a}return null};
w.createClone=function(a){var b=new AnimatedMeshSceneNode;S(this,b,a);b.la=this.la;if(this.Box)b.Box=this.Box.b();b.Oa=this.Oa;b.Ya=this.Ya;b.zd=this.zd;b.Xd=this.Xd;b.Yd=this.Yd;b.Xa=[];for(a=0;a<this.Xa.length;++a)b.Xa.push(this.Xa[a].b());b.Ha=this.Ha;b.Hb=this.Hb;b.yg=this.yg;b.ga=this.ga;b.Ga=this.Ga;b.Fd=this.Fd;b.$b=this.$b;b.Ke=this.Ke;return b};w.ai=o("Ha");w.di=o("Fd");
w.cd=function(a,b){if(!this.la)return false;var d=Math.floor(this.la.tb)-1;if(b<a){this.ga=Core.$a(b,0,d);this.Ga=Core.$a(a,this.ga,d)}else{this.ga=Core.$a(a,0,d);this.Ga=Core.$a(b,this.ga,d)}this.Jk(this.ga);return true};w.Jk=function(a){this.$b=Core.$a(a,this.ga,this.Ga);this.Hb=F()-Math.floor((this.$b-this.ga)/this.Ha)};w.fk=s("$b");w.ln=o("Ke");
w.OnAnimate=function(a,b){var d=F();if(this.zd==0||d-this.zd>this.Ke){var e;e=0;if(this.Xd!=0){this.Yd=(b-this.Hb)*this.Xd;if(this.Yd>1)this.Yd=this.Xd=0}if(this.ga==this.Ga)e=this.ga;else if(this.Ha==0)e=this.ga;else{e=0;if(this.Fd){e=Math.abs(Math.floor((this.Ga-this.ga)/this.Ha));e=this.Ha>0?this.ga+(b-this.Hb)%e*this.Ha:this.Ga-(b-this.Hb)%e*-this.Ha}else if(this.Ha>0){e=(b-this.Hb)*this.Ha;e=this.ga+e;if(e>this.Ga)e=this.Ga}else{e=(b-this.Hb)*-this.Ha;e=this.Ga-e;if(e<this.ga)e=this.ga}e=e}this.$b=
e;this.zd=d}return SceneNode.prototype.OnAnimate.call(this,a,b)};
w.render=function(a){a.gb(this.S);var b=this.la;if(b){var d=this.la;if(d){var e=false;e=this.fk();var f=1;if(f==null)f=1;if(!d.Fc||d.Cg==e)e=false;else{d.Cg=e;if(f<=0)e=false;else{for(f=0;f<d.ba.length;++f){var g=d.ba[f],j=g.md.b(),m=g.od.b(),l=g.nd.b(),n=-1,p=n=-1,t=g.gc;p=g.Lb;var k=g.kc,q=undefined,r=q=q=undefined;n=r=undefined;if(t.length){n=-1;if(n==-1)for(r=0;r<t.length;++r){q=t[r];if(q.frame>=e){n=r;break}}if(n!=-1)if(d.Gc==0||n==0){q=t[n];q.position.b()}else if(d.Gc==1){q=t[n];t=t[n-1];r=
e-q.frame;n=t.frame-e;j.Vb(ca(G(G(t.position.c(q.position),1/(r+n)),r),q.position))}}if(p.length){n=-1;if(n==-1)for(r=0;r<p.length;++r){q=p[r];if(q.frame>=e){n=r;break}}if(n!=-1)if(d.Gc==0||n==0){q=p[n];q.scale.b()}else if(d.Gc==1){q=p[n];p=p[n-1];r=e-q.frame;n=p.frame-e;m.Vb(ca(G(G(p.scale.c(q.scale),1/(r+n)),r),q.scale))}}if(k.length){p=-1;if(p==-1)for(r=0;r<k.length;++r){q=k[r];if(q.frame>=e){p=r;break}}if(p!=-1)if(d.Gc==0||p==0){q=k[p];q.rotation.b()}else if(d.Gc==1){q=k[p];k=k[p-1];r=e-q.frame;
n=k.frame-e;l.ji(q.rotation,k.rotation,r/(r+n))}}g.md=j.b();g.od=m.b();g.nd=l.b()}for(e=0;e<d.ba.length;++e){f=d.ba[e];if(f.gc.length||f.Lb.length||f.kc.length){if(!f.nd)f.nd=new Quaternion;if(!f.md)f.md=new Vect3d;f.Ic=f.nd.ik();g=f.Ic;j=f.md;g.d+=j.X*g.m;g.g+=j.Y*g.m;g.h+=j.Z*g.m;g.i+=j.X*g.n;g.e+=j.Y*g.n;g.j+=j.Z*g.n;g.k+=j.X*g.o;g.l+=j.Y*g.o;g.f+=j.Z*g.o;g.p+=j.X*g.s;g.q+=j.Y*g.s;g.r+=j.Z*g.s;g.U=false;f.Gi=false;if(f.Lb.length&&f.od&&!f.od.Yj(1,1,1)){j=f.od;g.d*=j.X;g.g*=j.X;g.h*=j.X;g.m*=j.X;
g.i*=j.Y;g.e*=j.Y;g.j*=j.Y;g.n*=j.Y;g.k*=j.Z;g.l*=j.Z;g.f*=j.Z;g.o*=j.Z}}else f.Ic=f.Ed.b()}e=true}}if(e){if(d.Fc){na(d,null,null);for(e=f=e=0;e<d.ba.length;++e){j=d.ba[e];for(f=0;f<j.pd.length;++f){g=d.ca[j.pd[f]];g.Nb=j.Dc.b()}}for(e=0;e<d.ca.length;++e){g=d.nf[e];for(f=0;f<g.length;++f)g[f]=false}for(e=0;e<d.jc.length;++e)oa(d,d.jc[e],null)}d.ka.MinEdge.Tb(0,0,0);d.ka.MaxEdge.Tb(0,0,0);if(d.ca.length){e=d.ca[0];e.ad();d.ka.MinEdge=e.Box.MinEdge.b();d.ka.MaxEdge=e.Box.MaxEdge.b();for(f=1;f<d.ca.length;++f){e=
d.ca[f];e.ad();if(e.Nb==null){d.ka.oa(e.Box.MinEdge);d.ka.oa(e.Box.MaxEdge)}else{g=e.Box.b();e.Nb.oe(g);d.ka.oa(g.MinEdge);d.ka.oa(g.MaxEdge)}}}this.Box=d.getBoundingBox().b();for(e=0;e<d.ca.length;++e)d.ca[e].update()}this.yg=this.$b}for(d=0;d<b.ca.length;++d){e=b.ca[d];if(d<this.Xa.length)e.Mat=this.Xa[d];e.Nb!=null&&a.gb(AbsoluteTransformation.ia(e.Nb));a.Rf(e.Mat);a.vf(e);e.Nb!=null&&a.gb(AbsoluteTransformation)}}};HotspotSceneNode=function(){this.Box=new Box3d;this.nl=this.Vl=0};HotspotSceneNode.prototype=new SceneNode;DummyTransformationSceneNode=function(){this.ra();this.Box=new Box3d};DummyTransformationSceneNode.prototype=new SceneNode;DummyTransformationSceneNode.prototype.createClone=function(a){var b=new DummyTransformationSceneNode;S(this,b,a);if(this.Box)b.Box=this.Box.b();return b};Scene=function(){this.ta=new SceneNode;this.ta.ea=this;this.Name="";this.ue=0;this.Li=this.lg=null;this.ma=0;this.Ta=null;this.xg=false;this.Bd=new Matrix4;this.Ol=null;this.Se=2;this.ac=0;this.Ye=[];this.Rd=[];this.Ie=[];this.Oe=[];this.ic=[];this.Kj=false};Scene.prototype.ra=function(){this.ta=new SceneNode;this.ta.ea=this;this.Name="";this.Bd=new Matrix4};Scene.prototype.Ff=v("unknown");Scene.prototype.sm=s("ac");
function Da(a,b){a.Ye=[];a.Rd=[];a.Ie=[];a.Oe=[];a.ta.OnRegisterSceneNode(a);a.ac=Scene.Ug;var d=null;if(a.Ta){d=a.Ta.aa();a.Ta.render(b)}a.ac=Scene.Wg;a.rj&&a.rj.render(b);b.Sj();var e;a.ac=Scene.hc;for(e=0;e<a.Ie.length;++e)a.Ie[e].render(b);a.ac=Scene.Vg;for(e=0;e<a.Ye.length;++e)a.Ye[e].render(b);a.ac=Scene.Md;d!=null&&a.Rd.sort(function(f,g){f=d.Sb(f.aa());g=d.Sb(g.aa());if(f<g)return 1;if(f>g)return-1;return 0});for(e=0;e<a.Rd.length;++e)a.Rd[e].render(b);a.ac=Scene.Re;for(e=0;e<a.Oe.length;++e)a.Oe[e].render(b);
Ka(a)}function Ka(a){if(a.Ta){a.Ta.Ja.F(a.Bd);a.Bd=a.Bd.ia(a.Ta.Tc)}}w=Scene.prototype;w.hn=o("ue");w.qm=s("ue");w.getName=s("Name");w.mn=o("Name");w.Pk=o("Se");w.Pf=o("Ta");w.Ea=s("Ta");w.Zj=function(){this.xg=true};w.Lh=s("ma");w.Fb=function(a,b){if(b==null)b=Scene.hc;switch(b){case Scene.Wg:this.rj=a;break;case Scene.hc:this.Ye.push(a);break;case Scene.Vg:this.Ie.push(a);break;case Scene.Ug:break;case Scene.Md:this.Rd.push(a);break;case Scene.Re:this.Oe.push(a);break}};
w.zh=function(a){if(this.ta==null)return null;var b=[];La(this,this.ta,a,b);return b};function La(a,b,d,e){b.getType()==d&&e.push(b);for(var f=0;f<b.B.length;++f)La(a,b.B[f],d,e)}function ga(a,b){if(a.ta==null)return null;var d=[];Ma(a,a.ta,b,d);return d}function Ma(a,b,d,e){b.Rb(d)!=null&&e.push(b);for(var f=0;f<b.B.length;++f)Ma(a,b.B[f],d,e)}Scene.prototype.Kh=function(a){if(this.ta==null)return null;return Na(this,this.ta,a)};
function Na(a,b,d){if(b.Name==d)return b;for(var e=0;e<b.B.length;++e){var f=Na(a,b.B[e],d);if(f)return f}return null}Scene.prototype.Ma=function(a){if(this.ta==null)return null;return Oa(this,this.ta,a)};function Oa(a,b,d){if(b.Id==d)return b;for(var e=0;e<b.B.length;++e){var f=Oa(a,b.B[e],d);if(f)return f}return null}Scene.prototype.je=s("ta");function Pa(a,b){if(b!=null){for(var d=0;d<a.ic.length;++d)if(a.ic[d]===b)return;a.ic.push(b)}}Scene.prototype.rm=s("lg");
function Fa(a,b,d){a=a.zh("mesh");if(a==null)return null;var e=null;if(d){d.clear();e=d}else e=new MetaTriangleSelector;for(d=0;d<a.length;++d){var f=a[d];if(f&&f.Oa){var g=null;g=f.Ya?f.Ya:f.u&&f.u.Fi()>100?new OctTreeTriangleSelector(f.u,f):new MeshTriangleSelector(f.u,f);if(b&&f.Ya==null)f.Ya=g;e.Oc.push(g)}}return e}Scene.Al=2;Scene.Bl=1;Scene.$i=2;Scene.Wg=1;Scene.hc=0;Scene.Vg=2;Scene.Ug=3;Scene.Md=4;Scene.Re=5;PanoramaScene=function(){this.ra()};PanoramaScene.prototype=new Scene;PanoramaScene.prototype.Ff=v("panorama");Free3dScene=function(){this.ra();this.qg=new Vect3d;this.ze=new Vect3d};Free3dScene.prototype=new Scene;Free3dScene.prototype.Ff=v("free");FlaceLoader=function(){this.a=this.V=null;this.Ei="";this.ya=0;this.O=this.Za=null;this.Og="";this.hf=null;this.Pm=function(a,b,d,e){this.Ei=b;this.Za=d;this.O=e;this.hf=new MeshCache;if(a.length==0){y(C,"Error: Could not load file '"+b+"'");a=navigator.appVersion;a!=null&&a.indexOf("Chrome")!=-1&&y(C,"<i>For using local files with Chrome, add the parameter '--allow-file-access-from-files' when starting the browser.</i>",true);return null}if(b.indexOf(".ccbjs"))a=base64decode(a);this.V=b=new CCDocument;
d=this.Ei;e=d.lastIndexOf("/");if(e!=-1)d=d.substring(0,e+1);this.Og=d;this.a=new BinaryStream(a);if(!this.Xh())return null;return b};this.Xh=function(){if(O(this.a)!=1701014630)return false;O(this.a);N(this.a,4);for(var a=0;K(this.a)>0;){var b=this.wa();++a;if(a==1&&b!=1)return false;switch(b){case 1:this.Rm();break;case 12:this.Sm();break;default:this.K()}}return true};this.K=function(){this.a.P=0+this.ya};this.wa=function(){var a=0;a=N(this.a,2);var b=0;this.xe=b=N(this.a,4);this.ya=this.a.P+b;
return a};this.ej=function(){var a=new Matrix4(false);this.Hl(a);return a};this.Hl=function(a){for(var b=0;b<16;++b)a.Ik(b,P(this.a))};this.Jl=function(){var a=new Quaternion;a.I=P(this.a);a.X=P(this.a);a.Y=P(this.a);a.Z=P(this.a);return a};this.H=function(){var a=N(this.a,4);if(a>104857600)return"";if(a<=0)return"";for(var b=[],d=0;d<a;++d){var e=N(this.a,1);e!=0&&b.push(String.fromCharCode(e))}return b.join("")};this.Rm=function(){for(var a=this.ya;K(this.a)>0&&this.a.P<a;)switch(this.wa()){case 1004:this.V.sd=
O(this.a);break;case 20:this.bn();break;case 2:var b=null;switch(O(this.a)){case 0:b=new Free3dScene;this.Zm(b);break;case 1:b=new PanoramaScene;this.an(b);break;default:this.K()}this.V.qh(b);break;default:this.K()}};this.bn=function(){O(this.a);this.V.al=this.H();for(var a=this.ya;K(this.a)>0&&this.a.P<a;)switch(this.wa()){case 21:this.K();break;case 22:this.K();break;default:this.K()}};this.Zm=function(a){var b=this.ya;for(this.cn(a);K(this.a)>0&&this.a.P<b;)switch(this.wa()){case 1007:a.qg=this.A();
a.ze=this.A();break;case 8:this.Kl(a);break;default:this.K()}};this.an=function(){this.K()};this.A=function(){var a=new Vect3d;a.X=P(this.a);a.Y=P(this.a);a.Z=P(this.a);return a};this.Nd=function(){var a=new Vect2d;a.X=P(this.a);a.Y=P(this.a);return a};this.yb=function(){var a=new Box3d;a.MinEdge=this.A();a.MaxEdge=this.A();return a};this.cn=function(a){if(this.wa()==26){a.Name=this.H();a.ue=O(this.a)}else this.tl()};this.tl=function(){this.a.position-=10};this.Kl=function(a){for(var b=this.ya;K(this.a)>
0&&this.a.P<b;)switch(this.wa()){case 9:this.gj(a,a.ta,0);break;default:this.K()}};this.gj=function(a,b,d){if(b!=null){var e=this.ya,f=O(this.a),g=O(this.a),j=this.H(),m=this.A(),l=this.A(),n=this.A(),p=L(this.a),t=O(this.a),k=null,q=0;if(d==0){b.Visible=p;b.Name=j;b.Na=t}for(;K(this.a)>0&&this.a.P<e;)switch(this.wa()){case 9:this.gj(a,k?k:b,d+1);break;case 10:switch(f){case 2037085030:k=new SkyBoxSceneNode;k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;this.Fk(k);b.Da(k);
k=k;k.Ba();break;case 1752395110:k=new MeshSceneNode;k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;this.Fk(k);b.Da(k);k=k;k.Ba();break;case 1835950438:k=new AnimatedMeshSceneNode;k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;this.Um(k);b.Da(k);k=k;k.Ba();break;case 1953526632:k=new HotspotSceneNode(this.O,null);k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;this.Xm(k);b.Da(k);k=k;k.Ba();break;case 1819042406:k=
new BillboardSceneNode;k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;this.Vm(k);b.Da(k);k=k;k.Ba();break;case 1835098982:k=new CameraSceneNode;k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.ea=a;k.Id=g;this.Wm(k);b.Da(k);k=k;k.Ba();break;case 1752461414:k=new PathSceneNode;k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;this.Ym(k);b.Da(k);k=k;k.Ba();break;case 1954112614:k=new DummyTransformationSceneNode;k.Type=f;k.Pos=
m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;k.Box=this.yb();for(var r=0;r<16;++r)P(this.a);b.Da(k);k=k;k.Ba();break;case 1868837478:k=new Overlay2DSceneNode(this.O);k.Type=f;k.Pos=m;k.Rot=l;k.Scale=n;k.Visible=p;k.Name=j;k.Na=t;k.Id=g;k.ea=a;this.Tm(k);b.Da(k);k=k;k.Ba();break;default:this.K();break}break;case 11:r=this.dj();k&&k.getMaterial(q)&&k.getMaterial(q).bi(r);++q;break;case 25:this.Gl(k,a);break;default:this.K()}}};this.Fk=function(a){var b=this.ya;a.Box=this.yb();L(this.a);
L(this.a);a.Oa=L(this.a);for(L(this.a);K(this.a)>0&&this.a.P<b;)switch(this.wa()){case 14:var d=this.Il();a.u=d;break;default:this.K()}};this.Il=function(){var a=new Mesh;a.Box=this.yb();for(var b=this.ya;K(this.a)>0&&this.a.P<b;)switch(this.wa()){case 15:var d=this.fj();d!=null&&a.Ua(d);break;default:this.K()}return a};this.fj=function(){var a=new MeshBuffer;a.Box=this.yb();for(var b=this.ya;K(this.a)>0&&this.a.P<b;)switch(this.wa()){case 11:a.Mat=this.dj();break;case 16:for(var d=Math.floor(this.xe/
2),e=0;e<d;++e)a.Indices.push(N(this.a,2));break;case 17:d=Math.floor(this.xe/36);for(e=0;e<d;++e){var f=new Vertex3D;f.Pos=this.A();f.Normal=this.A();f.Color=O(this.a);f.TCoords=this.Nd();f.TCoords2=new Vect2d;a.Vertices.push(f)}break;case 18:d=Math.floor(this.xe/44);for(e=0;e<d;++e){f=new Vertex3D;f.Pos=this.A();f.Normal=this.A();f.Color=O(this.a);f.TCoords=this.Nd();f.TCoords2=this.Nd();a.Vertices.push(f)}break;case 19:d=this.xe/60;for(e=0;e<d;++e){f=new Vertex3D;f.Pos=this.A();f.Normal=this.A();
f.Color=O(this.a);f.TCoords=this.Nd();f.TCoords2=new Vect2d;this.A();this.A();a.Vertices.push(f)}break;default:this.K()}return a};this.dj=function(){var a=new Material;a.Type=O(this.a);O(this.a);O(this.a);O(this.a);O(this.a);P(this.a);O(this.a);O(this.a);L(this.a);L(this.a);a.Cd=L(this.a);a.ZWriteEnabled=L(this.a);M(this.a,1);L(this.a);L(this.a);L(this.a);L(this.a);for(var b=0;b<4;++b){var d=this.Mc();switch(b){case 0:a.Tex1=d;break;case 1:a.Bb=d;break}L(this.a);L(this.a);L(this.a);if(N(this.a,2)!=
0)switch(b){case 0:a.ClampTexture1=true;break;case 1:break}}return a};this.cj=function(){return this.H()};this.Mc=function(){var a=this.cj(),b=this.Og+a;if(this.Za!=null&&a!="")return this.Za.rk(b,true);return null};this.Xm=function(a){var b=this.ya;a.Box=this.yb();a.Vl=O(this.a);for(a.nl=O(this.a);K(this.a)>0&&this.a.P<b;)switch(this.wa()){case 3:this.$m(a);break;default:this.K()}};this.$m=function(a){var b=this.ya;a.caption=this.H();a.Cj=this.Mc();this.Nd();O(this.a);a.Tn=this.H();for(a.fo=L(this.a);K(this.a)>
0&&this.a.P<b;)switch(this.wa()){case 6:a.Pn=true;a.Un=this.H();break;case 4:a.Qn=true;a.Hf=this.H();break;case 5:a.Rn=true;a.ho=this.H();a.io=this.H();break;default:this.K()}};this.Wm=function(a){a.Box=this.yb();a.Pa=this.A();a.Ob=this.A();a.Jb=P(this.a);a.Va=P(this.a);a.Qb=P(this.a);a.Pb=P(this.a);a.oi=L(this.a)};this.Vm=function(a){a.kb.Box=this.yb();a.Rc=P(this.a);a.mc=P(this.a);var b=M(this.a,1);a.Fe=(b&2)!=0};this.Ym=function(a){a.Box=this.yb();a.Tightness=P(this.a);a.IsClosedCircle=L(this.a);
O(this.a);for(var b=O(this.a),d=0;d<b;++d)a.Nodes.push(this.A())};this.Tm=function(a){O(this.a);a.Qc=L(this.a);if(a.Qc){a.Hd=O(this.a);a.Jd=O(this.a);a.Mn=O(this.a);a.Ln=O(this.a)}else{a.Pe=P(this.a);a.Qe=P(this.a);a.bf=P(this.a);a.af=P(this.a)}a.Pc=L(this.a);a.qd=O(this.a);a.Qa=this.Mc();a.Ud=this.Mc();a.Ue=L(this.a);a.vd=L(this.a);a.ef=M(this.a,1);a.Ca=this.H();a.dc=this.H();a.ff=O(this.a);a.te=L(this.a);a.Ng=L(this.a);a.Ee=O(this.a);a.Ne=L(this.a);a.De=O(this.a);a.Me=L(this.a)};this.Gl=function(a,
b){if(a){var d=null;switch(O(this.a)){case 100:b=new AnimatorRotation;b.Yg=this.A();d=b;break;case 101:b=new AnimatorFlyStraight;b.Start=this.A();b.End=this.A();b.Mb=O(this.a);b.fc=L(this.a);J(b);d=b;break;case 102:b=new AnimatorFlyCircle;b.jg=this.A();b.Bc=this.A();b.Radius=P(this.a);b.dh=P(this.a);b.ra();d=b;break;case 103:b=new AnimatorCollisionResponse;b.Radius=this.A();b.Ec=this.A();b.Zd=this.A();b.Cc=this.A();b.cf=P(this.a);d=b;break;case 104:b=new AnimatorCameraFPS(a,this.O);b.Jc=P(this.a);
b.MoveSpeed=P(this.a);b.RotateSpeed=P(this.a);b.JumpSpeed=P(this.a);b.NoVerticalMovement=L(this.a);O(this.a);d=b;break;case 105:b=new AnimatorCameraModelViewer(a,this.O);b.Radius=P(this.a);b.RotateSpeed=P(this.a);b.NoVerticalMovement=L(this.a);O(this.a);d=b;break;case 106:b=new AnimatorFollowPath(b);b.lf=O(this.a);b.Gg=L(this.a);b.Pg=this.H();b.Si=L(this.a);b.se=this.A();b.ug=M(this.a,1);b.hg=this.H();O(this.a);d=b;break;case 107:d=new AnimatorOnClick(b,this.O);d.eg=L(this.a);d.kg=L(this.a);O(this.a);
d.za=this.lb(b);d=d;break;case 108:d=new AnimatorOnProximity(b);d.vg=O(this.a);d.Zi=O(this.a);d.bj=P(this.a);d.Xe=O(this.a);O(this.a);d.za=this.lb(b);d=d;break;case 109:b=new AnimatorAnimateTexture;b.ih=O(this.a);b.Wd=O(this.a);b.gf=O(this.a);b.fc=L(this.a);d=O(this.a);b.da=[];for(var e=0;e<d;++e)b.da.push(this.Mc());d=b;break;case 110:d=new AnimatorOnMove(b,this.O);d.eg=L(this.a);d.kg=L(this.a);O(this.a);d.Zf=this.lb(b);d.Xf=this.lb(b);d=d;break;case 111:d=new AnimatorTimer(b);d.kf=O(this.a);O(this.a);
d.za=this.lb(b);d=d;break;case 112:d=new AnimatorOnKeyPress(b,this.O);d.Ge=O(this.a);d.Hc=O(this.a);d.En=L(this.a);O(this.a);d.za=this.lb(b);d=d;break;case 113:d=new AnimatorGameAI(b);d.re=O(this.a);d.Gd=P(this.a);d.$f=P(this.a);d.ig=L(this.a);d.vb=O(this.a);d.Aj=this.H();d.dg=this.H();d.Qg=P(this.a);d.Zg=O(this.a);d.pi=this.A();d.sj=this.H();d.Jj=this.H();d.Bi=this.H();d.qi=this.H();O(this.a);d.kd=this.lb(b);d.Vf=this.lb(b);d.Yf=this.lb(b);d.Wf=this.lb(b);d=d;break;default:this.K();return}d&&a.Vc(d)}else this.K()};
this.lb=function(a){if(O(this.a)){var b=new ActionHandler(a);this.El(b,a);return b}return null};this.El=function(a,b){var d=this.wa();if(d!=29)this.K();else for(var e=this.ya;K(this.a)>0&&this.a.P<e;){d=this.wa();if(d==30)(d=this.Dl(O(this.a),b))&&ka(a,d);else this.K()}};this.Sm=function(){for(var a=this.ya;K(this.a)>0&&this.a.P<a;)switch(this.wa()){case 13:var b=O(this.a),d=this.H(),e=O(this.a);if(b&4)(b=la(this.hf,d))&&this.dn(b,e);this.K();break;default:this.K()}};this.Um=function(a){a.Box=this.yb();
L(this.a);O(this.a);var b=O(this.a),d=O(this.a);a.Ha=P(this.a);M(this.a,1);a.Fd=L(this.a);O(this.a);a.ei(this.Fl(a));a.ga=b;a.Ga=d};this.Fl=function(a){var b=this.cj(),d=la(this.hf,b);if(d==null){d=new SkinnedMesh;d.Name=b;d!=null&&this.hf.Hg.push(d);d=d}if(a!=null&&d!=null){if(d.sb==null)d.sb=[];d.sb.push(a)}return d};this.dn=function(a,b){if(a!=null){O(this.a);a.hl=P(this.a);var d=this.ya;b=this.a.P+b;for(var e=[],f=0;K(this.a)>0&&this.a.P<d&&this.a.P<b;){var g=this.wa();if(g==33){g=new SkinnedMeshJoint;
g.Name=this.H();g.Ed=this.ej();g.yd=this.ej();a.ba.push(g);f=O(this.a);e.push(g);f>=0&&f<e.length&&e[f].B.push(g);f=O(this.a);for(var j=0;j<f;++j)g.pd.push(O(this.a));j=O(this.a);for(f=0;f<j;++f){var m=new SkinnedMeshPositionKey;m.frame=P(this.a);m.position=this.A();g.gc.push(m)}j=O(this.a);for(f=0;f<j;++f){m=new SkinnedMeshScaleKey;m.frame=P(this.a);m.scale=this.A();g.Lb.push(m)}j=O(this.a);for(f=0;f<j;++f){m=new SkinnedMeshRotationKey;m.frame=P(this.a);m.rotation=this.Jl();g.kc.push(m)}j=O(this.a);
for(f=0;f<j;++f){m=new SkinnedMeshWeight;m.be=N(this.a,2);m.pe=O(this.a);m.ne=P(this.a);g.oc.push(m)}}else if(g==15){g=this.fj();g!=null&&a.Ua(g)}else if(g==34){g=new NamedAnimationRange;g.Name=this.H();g.Begin=P(this.a);g.End=P(this.a);g.FPS=P(this.a);a.Kc.push(g)}else this.K()}try{a.Cg=-1;a.vl=-1;b=d=0;var l,n;for(e=0;e<a.ba.length;++e){g=false;for(d=0;d<a.ba.length;++d){n=a.ba[d];for(f=0;f<n.B.length;++f)if(n.B[f]===a.ba[e])g=true}g||a.jc.push(a.ba[e])}for(d=0;d<a.ca.length;++d){e=[];a.nf.push(e);
l=a.ca[d];var p=l.Vertices.length;for(g=0;g<p;++g)e.push(false)}a.Fc=false;e=p=0;var t,k;for(p=0;p<a.ba.length;++p){k=a.ba[p];if(k.gc.length||k.Lb.length||k.kc.length||k.oc.length){a.Fc=true;break}}if(a.Fc)for(p=a.tb=0;p<a.ba.length;++p){k=a.ba[p];if(k.gc.length){var q=k.gc[k.gc.length-1];if(q.frame>a.tb)a.tb=q.frame}if(k.Lb.length){var r=k.Lb[k.Lb.length-1];if(r.frame>a.tb)a.tb=r.frame}if(k.kc.length){var A=k.kc[k.kc.length-1];if(A.frame>a.tb)a.tb=A.frame}}if(a.Fc&&!a.Wi){a.Wi=true;for(p=0;p<a.ba.length;++p){k=
a.ba[p];for(e=0;e<k.oc.length;++e){var B=k.oc[e],u=B.pe;t=a.ca[B.be];var z=t.Vertices[u];B.uj=z.Pos.b();B.tj=z.Normal.b()}}}ma(a,null,null);for(d=0;d<a.ba.length;++d){n=a.ba[d];for(b=0;b<n.pd.length;++b){l=a.ca[n.pd[b]];l.Nb=n.Dc.b()}}if(a.ca.length==0){a.ka.MinEdge.Tb(0,0,0);a.ka.MaxEdge.Tb(0,0,0)}else{l=a.ca[0];a.ka.MinEdge=l.Box.MinEdge.b();a.ka.MaxEdge=l.Box.MaxEdge.b();for(d=1;d<a.ca.length;++d){l=a.ca[d];if(l.Nb==null){a.ka.oa(l.Box.MinEdge);a.ka.oa(l.Box.MaxEdge)}else{var D=l.Box.b();l.Nb.oe(D);
a.ka.oa(D.MinEdge);a.ka.oa(D.MaxEdge)}}}}catch(E){y(C,"error finalizing skinned mesh: "+E)}if(a.sb&&a.sb.length){for(f=0;f<a.sb.length;++f)(l=a.sb[f])&&l.cd(l.ga,l.Ga);a.sb=null}}};this.Dl=function(a){var b=0;switch(a){case 0:b=new Action.Ni;b.Hi=O(this.a);b.$g=O(this.a);b.sa=L(this.a);O(this.a);return b;case 1:a=new Action.ui;a.Rg=O(this.a);a.Qd=O(this.a);a.sa=L(this.a);a.na=this.A();a.Xg=L(this.a);a.Pd=O(this.a);b=O(this.a);if(b&1){a.$d=true;a.nc=O(this.a)}return a;case 2:b=new Action.vi;b.Ll=O(this.a);
b.ij=O(this.a);b.sa=L(this.a);b.na=this.A();O(this.a);return b;case 3:b=new Action.wi;b.Ml=O(this.a);b.jj=O(this.a);b.sa=L(this.a);b.na=this.A();O(this.a);return b;case 4:b=new Action.xi;b.ih=O(this.a);b.Nc=O(this.a);b.sa=L(this.a);b.Cj=this.Mc();O(this.a);return b;case 5:this.K();case 6:this.K();case 7:b=new Action.Di;O(this.a);b.sl=this.H();return b;case 8:b=new Action.Ti;O(this.a);b.Ul=this.H();b.Pa=this.H();return b;case 9:b=new Action.nj;b.Kn=O(this.a);b.sa=L(this.a);b.fc=L(this.a);b.zn=this.H();
O(this.a);return b;case 10:b=new Action.vj(this.O);b.Nl=this.H();O(this.a);return b;case 11:b=new Action.kj(this.O);b.ti=O(this.a);O(this.a);return b;case 12:a=new Action.lj;a.Rg=O(this.a);a.Qd=O(this.a);a.sa=L(this.a);a.na=this.A();a.Xg=L(this.a);a.Pd=O(this.a);b=O(this.a);if(b&1){a.$d=true;a.nc=O(this.a)}return a;case 13:b=new Action.oj;b.bh=O(this.a);b.pg=O(this.a);b.ri=P(this.a);b.ah=O(this.a);b.ae=P(this.a);O(this.a);return b;case 14:this.K();return null;case 15:b=new Action.mj;O(this.a);b.Nc=
O(this.a);b.sa=L(this.a);b.Ca=this.H();return b;default:this.K()}return null}};Animator=function(){this.Type=-1};w=Animator.prototype;w.getType=v("none");w.animateNode=v(false);w.onMouseDown=h();w.onMouseUp=h();w.onMouseMove=h();w.onKeyDown=h();w.onKeyUp=h();AnimatorCameraFPS=function(a,b){this.Type=-1;this.Zc=0;this.th=this.li=this.Zh=this.Th=this.NoVerticalMovement=false;this.Yh=this.Gb=0;this.uc=20;this.$c=100;this.mi=(this.$c-this.uc)/50;this.co=this.uc;this.Wb=90;this.Zc=F();this.M=a;this.O=b;a&&this.Uh(a.qb())};AnimatorCameraFPS.prototype=new Animator;w=AnimatorCameraFPS.prototype;w.getType=v("camerafps");w.Jc=88;w.MoveSpeed=0.06;w.RotateSpeed=200;w.JumpSpeed=0;w.NoVerticalMovement=false;w.MayMove=true;w.MayZoom=true;
function Ea(a,b){MayMove=b}w=AnimatorCameraFPS.prototype;w.Uh=function(a){if(this.M!=null){a=a.c(this.M.Pos);a=a.fe();this.Gb=a.X;this.Yh=a.Y;if(this.Gb>this.Jc)this.Gb-=360}};
w.animateNode=function(){if(this.M==null)return false;var a=F(),b=a-this.Zc;if(b>250)b=250;this.Zc=a;a=this.M.Pos.b();if(this.MayMove&&(this.li||this.th)){var d=this.M.Pos.c(this.M.qb());if(this.NoVerticalMovement)d.Y=0;d.normalize();this.li&&a.R(d.w(this.MoveSpeed*-b));this.th&&a.R(d.w(this.MoveSpeed*b))}if(this.MayMove&&(this.Th||this.Zh)){d=this.M.Pos.c(this.M.qb()).Aa(this.M.Mh());d.normalize();if(this.Th){d=d.w(this.MoveSpeed*-b);a.R(d);this.M.Ub(this.M.qb().add(d))}if(this.Zh){d=d.w(this.MoveSpeed*
b);a.R(d);this.M.Ub(this.M.qb().add(d))}}this.M.Pos=a;if(this.MayZoom){a=Core.Nf(this.M.ek());this.Wb+=0*b;if(this.Wb<this.uc)this.Wb=this.uc;if(this.Wb>this.$c)this.Wb=this.$c;d=this.mi;d=Math.abs(this.Wb-a)/8;if(d<this.mi)d=this.mi;if(a<this.$c-d&&a<this.Wb){a+=d;if(a>this.$c)a=this.$c}if(a>this.uc+d&&a>this.Wb){a-=d;if(a<this.uc)a=this.uc}this.M.Lk(Core.Wj(a))}a=new Vect3d(0,0,1);d=new Matrix4;d.wc(new Vect3d(this.Gb,this.Yh,0));d.dd(a);d=0;if(this.O.Lf())d=this.O.ie()-this.O.Eh();d+=0;if(d>300)d=
300;if(d<-300)d=-300;this.Gb+=d*b*this.RotateSpeed*2.0E-5;if(this.Gb<-this.Jc)this.Gb=-this.Jc;if(this.Gb>this.Jc)this.Gb=this.Jc;d=0;if(this.O.Lf())d=this.O.he()-this.O.Dh();d+=0;if(d>300)d=300;if(d<-300)d=-300;this.Yh+=d*b*this.RotateSpeed*2.0E-5;this.M.Ub(this.M.Pos.add(a));return false};w.onMouseDown=function(a){Animator.prototype.onMouseDown.call(this,a)};w.onMouseUp=function(a){Animator.prototype.onMouseUp.call(this,a)};w.onMouseMove=function(a){Animator.prototype.onMouseMove.call(this,a)};
function Qa(a,b,d){if(d==37||d==65)a.Th=b;if(d==39||d==68)a.Zh=b;if(d==38||d==87)a.li=b;if(d==40||d==83)a.th=b}AnimatorCameraFPS.prototype.onKeyDown=function(a){Qa(this,true,a.keyCode)};AnimatorCameraFPS.prototype.onKeyUp=function(a){Qa(this,false,a.keyCode)};AnimatorCameraModelViewer=function(a,b){this.Type=-1;this.RotateSpeed=0.06;this.Radius=100;this.NoVerticalMovement=false;this.Zc=F();this.M=a;this.O=b};AnimatorCameraModelViewer.prototype=new Animator;w=AnimatorCameraModelViewer.prototype;w.getType=v("cameramodelviewer");w.RotateSpeed=0.06;w.Radius=100;w.NoVerticalMovement=false;
w.animateNode=function(){if(this.M==null)return false;var a=F(),b=a-this.Zc;if(b>250)b=250;this.Zc=a;a=this.M.Pos.b();var d=this.M.Pa.b(),e=d.c(this.M.aa()),f=0,g=0;if(this.O.Lf()){f=(this.O.he()-this.O.Dh())*this.RotateSpeed/5E4;g=(this.O.ie()-this.O.Eh())*this.RotateSpeed/5E4}e=e.Aa(this.M.Ob);e.Y=0;e.normalize();if(!Core.G(f)){e.Fa(b*f);a.R(e)}if(!this.NoVerticalMovement&&!Core.G(g)){f=this.M.Ob.b();f.normalize();b=a.add(f.w(b*g));g=b.b();g.Y=d.Y;f=this.Radius/10;if(g.va(d)>f)a=b}e=a.c(d);e.vc(this.Radius);
a=d.add(e);this.M.Pos=a;return false};AnimatorFollowPath=function(a){this.lf=5E3;this.Gg=this.Ag=this.Ej=false;this.Si=true;this.Dj=0;this.Fg=true;this.ug=AnimatorFollowPath.Ae;this.df=false;this.wb=a;this.ma=0;this.Ej=false;this.xb=this.He=null;this.df=false;this.Pg=null;this.Dj=0;this.hg=this.se=null};AnimatorFollowPath.prototype=new Animator;AnimatorFollowPath.Ae=0;AnimatorFollowPath.Ci=1;AnimatorFollowPath.il=2;AnimatorFollowPath.prototype.getType=v("followpath");
AnimatorFollowPath.prototype.on=function(a,b,d){this.ug=AnimatorFollowPath.Ae;this.Gg=d;this.lf=b};
AnimatorFollowPath.prototype.animateNode=function(a,b){if(a==null||!this.wb||!this.lf)return false;if(a!==this.He){if(this.He=a)this.Ag=this.He.getType()=="camera";return false}if(!this.xb)if(!this.Ej)if(this.Pg.length)if(this.wb){var d=this.wb.Kh(this.Pg);d&&d.getType()=="path"&&this.Mk(d)}if(this.xb==null)return false;d=false;var e=null;if(this.Ag&&this.Si){d=!this.Fg;e=a;if(this.wb.Ea()!==e){if(this.xb.Nodes.length)e.Pos=this.xb.nk(0);this.Fg=true;return false}else this.Fg=false;if(!this.ma||!d)this.ma=
b}if(!this.ma)this.ma=this.wb.Lh();e=(b-this.ma+this.Dj)/this.lf;if(e>1&&!this.xb.IsClosedCircle)switch(this.ug){case AnimatorFollowPath.Ae:e%=1;break;case AnimatorFollowPath.Ci:e=1;break;case AnimatorFollowPath.il:e=1;if(!this.df){if(this.wb)if(this.hg.length)if((d=this.wb.Kh(this.hg))&&d.getType()=="camera"){(b=this.wb.Li)&&R(d,b.fb(),b.eb());this.wb.Pf(d)}this.df=true}break}else this.df=false;b=this.xb.Hh(e);d=!b.t(a.Pos);a.Pos=b;if(this.Gg&&this.xb.Nodes.length){e=this.xb.Hh(e+0.0010);if(!Core.G(e.va(b))){var f=
e.c(b);f.vc(100);if(this.Ag){e=a;a=b.add(f);d=d||!a.t(e.Pa);e.Ub(a)}else{if(!this.se||this.se.wf())e=f.fe();else{e=new Matrix4;e.wc(f.fe());b=new Matrix4;b.wc(this.se);e=e.ia(b);e=e.Jh()}d=d||!e.t(a.Rot);a.Rot=e}}}return d};AnimatorFollowPath.prototype.Mk=o("xb");AnimatorFlyStraight=function(a,b,d,e,f,g){this.Start=new Vect3d(0,0,0);this.End=new Vect3d(40,40,40);this.ma=F();this.Mb=3E3;this.Bj=this.ag=this.ud=this.fc=false;this.qj=null;this.pj=0;this.Ai=false;if(a)this.Start=a.b();if(b)this.End=b.b();if(d)this.Mb=d;if(e)this.fc=e;J(this);if(f)this.ud=f;if(g)this.ag=g};AnimatorFlyStraight.prototype=new Animator;AnimatorFlyStraight.prototype.getType=v("flystraight");
AnimatorFlyStraight.prototype.animateNode=function(a,b){var d=b-this.ma;b=false;if(d!=0){var e=this.Start.b();if(!this.fc&&d>=this.Mb){e=this.End.b();b=true}else e.R(this.na.w(d%this.Mb*this.Pl));if(this.ag)a.getType()=="camera"&&a.Ub(e);else a.Pos=e;if(this.Bj){if(a){a.Ba();d=a.Ra();e=false;for(var f=ga(a.ea,"gameai"),g=0;g<f.length;++g)if(f[g]!==this.qj){var j=f[g].Rb("gameai");if(!(j&&!(j.vb>0)))if(d.Qh(f[g].Ra())){ja(j,this.pj,f[g]);e=true;break}}d=e}else d=false;b=d||b}if(b){this.ud&&a.Gk(this);
this.Ai&&a.Parent&&a.Parent.removeChild(a)}return true}return false};function J(a){a.na=a.End.c(a.Start);a.Tl=a.na.qa();a.na.normalize();a.Pl=a.Tl/a.Mb};AnimatorFlyCircle=function(a,b,d,e){this.jg=new Vect3d;this.Bc=new Vect3d(0,1,0);this.ph=new Vect3d;this.Sc=new Vect3d;this.ma=F();this.dh=0.01;this.Radius=100;if(a)this.jg=a.b();if(b)this.Radius=b;if(d)this.Bc=d.b();if(e)this.dh=e;this.ra()};AnimatorFlyCircle.prototype=new Animator;AnimatorFlyCircle.prototype.getType=v("flycircle");
AnimatorFlyCircle.prototype.animateNode=function(a,b){b=b-this.ma;if(b!=0){b=b*this.dh;b=this.ph.w(Math.cos(b)).add(this.Sc.w(Math.sin(b)));b.Fa(this.Radius);a.Pos=this.jg.add(b);return true}return false};AnimatorFlyCircle.prototype.ra=function(){this.Bc.normalize();this.Sc=this.Bc.Y!=0?new Vect3d(50,0,0):new Vect3d(0,50,0);this.Sc=this.Sc.Aa(this.Bc);this.Sc.normalize();this.ph=this.Sc.Aa(this.Bc);this.ph.normalize()};AnimatorRotation=function(a){this.Yg=new Vect3d;if(a)this.Yg=a.b();this.ma=F()};AnimatorRotation.prototype=new Animator;AnimatorRotation.prototype.getType=v("rotation");AnimatorRotation.prototype.animateNode=function(a,b){var d=b-this.ma;if(d!=0){a.Rot.R(this.Yg.w(d/10));this.ma=b;return true}return false};AnimatorAnimateTexture=function(a,b,d){this.da=[];this.fc=true;this.Wd=20;this.gf=this.ih=0;this.ma=F();if(a)this.da=a;if(b)this.Wd=b;if(d==true)this.Xn=false};AnimatorAnimateTexture.prototype=new Animator;AnimatorAnimateTexture.prototype.getType=v("animatetexture");
AnimatorAnimateTexture.prototype.animateNode=function(a,b){if(a==null||this.da==null)return false;var d=false,e=null;if(this.da.length){var f=a.ea.Lh();e=b-f;var g=f+this.Wd*this.da.length;f=0;f=!this.fc&&b>=g?this.da.length-1:this.Wd>0?Math.floor(e/this.Wd%this.da.length):0;if(f<this.da.length)if(this.ih==1){if(this.gf>=0&&this.gf<a.getMaterialCount())if((e=a.getMaterial(this.gf))&&e.Tex1!==this.da[f]){e.Tex1=this.da[f];d=true}}else{b=a.getMaterialCount();for(g=0;g<b;++g)if((e=a.getMaterial(g))&&
e.Tex1!==this.da[f]){e.Tex1=this.da[f];d=true}}}return d};AnimatorOnClick=function(a,b,d,e){this.bb=b;this.Vd=0;this.Vi=this.Ui=-1;this.Jn=false;this.Fn=null;this.lc=a;this.zg=d;this.eg=true;this.kg=false;this.ua=this.za=null;e!=true&&Pa(a,this)};AnimatorOnClick.prototype=new Animator;AnimatorOnClick.prototype.getType=v("onclick");AnimatorOnClick.prototype.animateNode=function(a){if(a==null)return false;if(this.Vd)if(F()-this.Vd<1500){this.Vd=0;if(a.Visible&&Ra(this,a,this.Ui,this.Vi)){this.zg&&this.zg();this.If(a);return true}}return false};
AnimatorOnClick.prototype.onMouseUp=function(a){this.Ui=a.clientX-this.bb.Kb.offsetLeft+document.body.scrollLeft;this.Vi=a.clientY-this.bb.Kb.offsetTop+document.body.scrollTop;this.Vd=F()};AnimatorOnClick.prototype.If=function(a){this.za&&this.za.execute(a)};
function Ra(a,b,d,e){if(b==null)return false;if(b.getType()=="2doverlay"){var f=Ia(b,false,a.bb.pk());if(f.x<=d&&f.y<=e&&f.x+f.hb>=d&&f.y+f.Sa>=e)return true}d=a.bb.bk(d,e);if(d==null)return false;e=a.lc.Ea();if(e==null)return false;e=e.aa();f=new Line3d;f.Start=e;f.End=d;return ia(a,a.lc,b,f,a.eg,a.kg,a.ua,null)}function ha(a,b,d,e,f){if(!f||!b)return 999999999999;if(a=f.zf(d,e,true))return d.va(a);return 999999999999}
function ia(a,b,d,e,f,g,j,m){var l=d.getBoundingBox(),n=0;n=new Matrix4(false);if(d.S.Ch(n))if(l.wk(n.Db(e.Start),n.Db(e.End))){n=null;if(d.kk&&d.u)n=d;f=n==null||f;if(!f){l=n.Ya;if(l==null){l=new MeshTriangleSelector(n.u,n);n.Ya=l}if(l){l=l.zf(e.Start,e.End,true);if(l!=null)if(g){n=ha(a,b,e.Start,l,j);if(n+Core.Ab<l.va(e.Start))return false;else{if(m!=null)m.N=l.va(e.Start);return true}}else{if(m!=null)m.N=e.Start.va(d.Ra().db());return true}}else f=true}if(f)if(g){e=e.Start.b();l=d.Ra();g=l.Bf();
g.Fa(0.5);g=Core.Ak(g.X,g.Y,g.Z);g=Math.sqrt(g*g+g*g);d=d.Ra().db();n=ha(a,b,e,d,j);a=d.va(e)-g;if(n<a)return false;else{if(m!=null)m.N=a;return true}}else{if(m!=null)m.N=e.Start.va(d.Ra().db());return true}}return false};AnimatorOnMove=function(a,b){this.bb=b;this.lc=a;this.Zf=this.Xf=null;this.rh=this.kh=0};AnimatorOnMove.prototype=new AnimatorOnClick(null,null,null,true);AnimatorOnMove.prototype.getType=v("onmove");AnimatorOnMove.prototype.animateNode=function(a){var b=this.kh==0,d=F();if(b||d-this.kh>200){this.kh=d;d=Ra(this,a,this.bb.he(),this.bb.ie());if(b)this.rh=d;else if(d!=this.rh){if((this.rh=d)&&this.Xf)this.Xf.execute(a);else!d&&this.Zf&&this.Zf.execute(a);return true}}return false};AnimatorOnProximity=function(a,b,d,e,f){this.Vd=0;this.$h=a;this.za=this.Xe=this.bj=this.Zi=this.vg=0;this.zg=e;if(b)this.Radius=b;if(d)this.Xe=d;if(f)this.vg=EPET_LEAVE;this.Bg=false};AnimatorOnProximity.prototype=new Animator;AnimatorOnProximity.prototype.getType=v("oncollide");
AnimatorOnProximity.prototype.animateNode=function(a){if(a==null||this.$h==null)return false;var b=false,d=null;if(this.Zi==0)d=this.$h.Ea();else if(this.Xe!=-1)d=this.$h.Ma(this.Xe);if(d){if(a===d)return false;var e=d.aa();a=a.aa();e=e.va(a)<this.bj;switch(this.vg){case 0:if(e&&!this.Bg){this.If(d);b=true}break;case 1:if(!e&&this.Bg){this.If(d);b=true}break}this.Bg=e}return b};AnimatorOnProximity.prototype.If=function(a){this.za&&this.za.execute(a)};AnimatorCollisionResponse=function(a,b,d,e,f){this.Radius=a;this.Ec=b;this.Zd=d;this.ua=e;this.cf=f;this.Dg=this.Ia=null;this.Ad=new Vect3d(0,0,0);this.Cc=new Vect3d(0,0,0);this.wg=false;if(this.Ec==null)this.Ec=new Vect3d(0,1,0);if(this.Radius==null)this.Radius=new Vect3d(30,50,30);if(this.Zd==null)this.Zd=new Vect3d(0,0,0);if(this.cf==null)this.cf=5.0E-4;this.reset()};AnimatorCollisionResponse.prototype=new Animator;w=AnimatorCollisionResponse.prototype;w.getType=v("collisionresponse");
w.reset=function(){this.Ia=null;this.Dg=F()};w.gb=o("ua");w.Oh=s("ua");w.kn=o("Ec");w.um=s("Ec");w.Lm=s("wg");
w.animateNode=function(a,b){var d=b-this.Dg;if(!this.ua)return false;if(d>150)d=150;this.Dg=b;if(this.Ia!==a){this.Ia=a;this.Ad=a.Pos.b()}var e=a.Pos.b(),f=a.Pos.c(this.Ad);this.Cc=this.Cc.add(this.Ec.w(d*0.0010));if(!f.add(this.Cc).wf()){d=null;if(a&&a.getType()=="camera")d=a;var g;if(d)g=d.Pa.c(d.Pos);new Triangle3d;b={};b.N=0;var j=this.ua,m=this.Ad.c(this.Zd),l=this.Radius,n=this.eo,p=this.cf;n=this.Cc;if(!j||l.X==0||l.Y==0||l.Z==0)e=m;else{e={};e.Kd=m.b();e.Tg=f.b();e.Ka=l.b();e.me=9.99999999E7;
e.fn=j;e.un=p;e.Sf=0;e.ke=new Vect3d;f=e.Kd.sf(e.Ka);j=e.Tg.sf(e.Ka);f=Sa(this,0,e,f,j);b.N=0;if(!n.wf()){e.Kd=f.Wh(e.Ka);e.Tg=n.b();e.Sf=0;j=n.sf(e.Ka);f=Sa(this,0,e,f,j);b.N=e.Sf==0?1:0;if(b.N<0.5&&e.Ph){n=e.Ph.Fh();n.normalize();if(!(Math.abs(n.Y)>Math.abs(n.X)&&Math.abs(n.Y)>Math.abs(n.Z)))b.N=1}}if(e.Sf){n=e.Ph;n.pointA.le(e.Ka);n.pointB.le(e.Ka);n.pointC.le(e.Ka)}f.le(e.Ka);e=f}e.R(this.Zd);if(b.N<0.5){this.wg=false;this.Cc.Tb(0,0,0)}else this.wg=true;if(a.Pos.t(e))return false;a.Pos=e.b();
if(d&&g){b=true;for(e=0;e<a.J.length;++e)if((n=a.J[e])&&n.getType()=="cameramodelviewer"){b=false;break}if(b)d.Pa=a.Pos.add(g)}}this.Ad.t(a.Pos);this.Ad=a.Pos.b();return false};
function Sa(a,b,d,e,f){var g=d.un;if(b>5)return e.b();d.Uf=f.b();d.Dk=f.b();d.Dk.normalize();d.pf=e.b();d.xh=false;d.me=9.99999999E7;var j=new Box3d;d.Kd.F(j.MinEdge);d.Kd.F(j.MaxEdge);j.oa(d.Kd.add(d.Tg));j.MinEdge.xc(d.Ka);j.MaxEdge.R(d.Ka);var m=[],l=new Matrix4;l.Rk(1/d.Ka.X,1/d.Ka.Y,1/d.Ka.Z);d.fn.rb(j,l,m);for(j=0;j<m.length;++j)a:{l=m[j];var n=l.Gh();if(n.Rh(d.Dk)){var p=0,t=0,k=false,q=0;p=n.va(d.pf);var r=n.Normal.z(d.Uf);if(Core.G(r))if(Math.abs(p)>=1)break a;else{k=true;t=0}else{r=1/r;
t=(-1-p)*r;p=(1-p)*r;if(t>p){r=p;p=t;t=r}if(t>1||p<0)break a;t=Core.$a(t,0,1);Core.$a(p,0,1)}p=new Vect3d;r=false;var A=1;if(!k){n=d.pf.c(n.Normal).add(d.Uf.w(t));if(l.xk(n)){r=true;A=t;p=n.b()}}if(!r){n=d.Uf.b();t=d.pf.b();k=n.La();var B=q=0,u=0,z={};z.N=0;q=k;B=2*n.z(t.c(l.pointA));u=l.pointA.c(t).La()-1;if(V(a,q,B,u,A,z)){A=z.N;r=true;p=l.pointA.b()}if(!r){B=2*n.z(t.c(l.pointB));u=l.pointB.c(t).La()-1;if(V(a,q,B,u,A,z)){A=z.N;r=true;p=l.pointB.b()}}if(!r){B=2*n.z(t.c(l.pointC));u=l.pointC.c(t).La()-
1;if(V(a,q,B,u,A,z)){A=z.N;r=true;p=l.pointC.b()}}var D=l.pointB.c(l.pointA);u=l.pointA.c(t);var E=D.La(),H=D.z(n),I=D.z(u);q=E*-k+H*H;B=E*2*n.z(u)-2*H*I;u=E*(1-u.La())+I*I;if(V(a,q,B,u,A,z)){q=(H*z.N-I)/E;if(q>=0&&q<=1){A=z.N;r=true;p=l.pointA.add(D.w(q))}}D=l.pointC.c(l.pointB);u=l.pointB.c(t);E=D.La();H=D.z(n);I=D.z(u);q=E*-k+H*H;B=E*2*n.z(u)-2*H*I;u=E*(1-u.La())+I*I;if(V(a,q,B,u,A,z)){q=(H*z.N-I)/E;if(q>=0&&q<=1){A=z.N;r=true;p=l.pointB.add(D.w(q))}}D=l.pointA.c(l.pointC);u=l.pointC.c(t);E=D.La();
H=D.z(n);I=D.z(u);q=E*-k+H*H;B=E*2*n.z(u)-2*H*I;u=E*(1-u.La())+I*I;if(V(a,q,B,u,A,z)){q=(H*z.N-I)/E;if(q>=0&&q<=1){A=z.N;r=true;p=l.pointC.add(D.w(q))}}}if(r){r=A*d.Uf.qa();if(!d.xh||r<d.me){d.me=r;d.ke=p.b();d.xh=true;d.Ph=l;++d.Sf}}}}if(!d.xh)return e.add(f);m=e.add(f);e=e.b();if(d.me>=g){f=f.b();f.vc(d.me-g);e=d.pf.add(f);f.normalize();d.ke.xc(f.w(g))}f=d.ke.b();j=e.c(d.ke);j.normalize();l=new Plane3d;l.fi(f,j);f=m.c(j.w(l.va(m))).c(d.ke);if(f.qa()<g)return e;return Sa(a,b+1,d,e,f)}
function V(a,b,d,e,f,g){a=d*d-4*b*e;if(a<0)return false;e=Math.sqrt(a);a=(-d-e)/(2*b);b=(-d+e)/(2*b);if(a>b){d=b;b=a;a=d}if(a>0&&a<f){g.N=a;return true}if(b>0&&b<f){g.N=b;return true}return false};AnimatorTimer=function(a){this.lh=0;this.lc=a;this.za=null;this.kf=0;this.lh=F()};AnimatorTimer.prototype=new Animator;AnimatorTimer.prototype.getType=v("timer");AnimatorTimer.prototype.animateNode=function(a){if(a==null)return false;if(this.kf>0){var b=F();if(b-this.lh>this.kf){this.lh=b;this.za&&this.za.execute(a);return true}}return false};AnimatorOnKeyPress=function(a,b){this.lc=a;this.za=null;this.Cb=this.kf=0;this!=null&&b.Te.push(this);this!=null&&b.hj.push(this);Pa(a,this)};
AnimatorOnKeyPress.prototype=new Animator;w=AnimatorOnKeyPress.prototype;w.getType=v("keypress");w.animateNode=function(a){if(a==null)return false;if(this.Cb)if(F()-this.Cb<1E3){this.Cb=0;this.za&&this.za.execute(a);return true}return false};w.onKeyDown=function(a){if(this.Ge==0&&a.keyCode==this.Hc)this.Cb=F()};w.onKeyUp=function(a){if(this.Ge==1&&a.keyCode==this.Hc)this.Cb=F()};w.onMouseUp=function(a){if(this.Ge==1)if(a.button>1&&this.Hc==2)this.Cb=F();else if(a.button<=1&&this.Hc==1)this.Cb=F()};
w.onMouseDown=function(a){if(this.Ge==0)if(a.button>1&&this.Hc==2)this.Cb=F();else if(a.button<=1&&this.Hc==1)this.Cb=F()};
AnimatorGameAI=function(a){this.$f=this.Gd=this.re=0;this.ig=false;this.vb=100;this.dg=this.Aj="";this.Qg=100;this.Zg=0;this.pi=new Vect3d;this.qi=this.Bi=this.Jj=this.sj="";this.Wf=this.Yf=this.Vf=this.kd=null;this.Eg=this.Mg=this.ib=0;this.Ac=null;this.ve=this.Zb=this.ub=this.rd=0;this.ml=null;this.ng=this.ni=this.cg=false;this.og=new Line3d;this.jh=this.ua=null;this.jf=a;this.Ki=0;this.eh=new Vect3d;this.Kg=null;this.Lg=0};AnimatorGameAI.prototype=new Animator;
AnimatorGameAI.prototype.getType=v("gameai");
AnimatorGameAI.prototype.animateNode=function(a,b){if(a==null||this.jf==null)return false;var d=b-this.Ki;if(d>150)d=150;this.Ki=b;var e=0,f=false;if(this.jh!==a){this.jh=a;a.Ba();this.eh=a.aa()}var g=a.aa();if(this.ib!=3)if(this.ib==1){e=Ta(this,a);if(this.Ac.c(g).qa()<e){this.ib=0;this.bd(a,0);f=true}else{f=false;if(this.ub>2){e=this.ub*(this.Gd/1E3);if(this.ve.c(g).qa()*2<e){this.ib=0;f=true}}if(!f){this.ub+=d;f=this.Ac.c(g);f.vc(this.Gd/1E3*d);a.Pos.R(f)}f=Ua(this,a,b-this.rd,this.Ac.c(g),this.Zg)}}else if(this.ib==
2){this.ub+=d;if(!this.cg&&this.ub>this.Zb/2){this.ng=true;this.kd&&this.kd.execute(a);this.ng=false;f=this.cg=true}if(this.ub>this.Zb)this.ib=0;else f=Ua(this,a,b-this.rd,this.Ac.c(g),Math.min(this.Zg,this.Zb))}else if(this.ib==0)if(this.re==1||this.re==2){if(this.$f<=0||!this.jh||this.dg.length==0||!this.jf)d=null;else if(!this.Mg||b>this.Mg){this.Lg=this.$f;this.Kg=null;Va(this,this.jf.je(),g,this.dg);this.Mg=b+500+Math.random()*1E3;d=this.Kg}else d=null;if(d!=null){f=1E3;if(this.kd){a:{e=this.kd;
for(var j=0;j<e.ld.length;++j){var m=e.ld[j];if(m.Type=="Shoot"){e=m;break a}}e=null}if(e)f=e.ae}e=f;!this.ni&&this.Vf&&this.Vf.execute(a);f=this.ni=true;if(d.aa().va(g)<e)if(!d||!a?false:Wa(this,d.Ra().db(),a.Ra().db())){this.og.Start=a.Ra().db();this.og.End=d.Ra().db();e=d;d=d.aa();this.ib=2;this.Ac=d;this.rd=b;this.ml=e;this.ve=g;this.ub=0;this.Zb=500;this.cg=false;a=this.bd(a,2);if(a!=0)this.Zb=a}else Xa(this,a,d.aa(),g,b);else Xa(this,a,d.aa(),g,b)}else if(this.re==2){d=1E4;if(this.Gd)d=this.Qg/
(this.Gd/1E3);if(!this.Eg||b>this.Eg+d){d=this.Qg;this.Eg=b;d=new Vect3d((Math.random()-0.5)*d,(Math.random()-0.5)*d,(Math.random()-0.5)*d);d.R(this.eh);if(!this.ig)d.Y=this.eh.Y;e=Ta(this,a);if(!(d.c(g).qa()<e)){Xa(this,a,d,g,b);f=true}}}}return f};
function Ua(a,b,d,e,f){if(!b)return false;if(b.getType()=="camera")return false;if(!a.ig)e.Y=0;var g=new Matrix4;g.wc(e.fe());e=new Matrix4;e.wc(a.pi);g=g.ia(e);a=g.Jh();g=b.Rot.b();d=Math.min(d,f)/f;d=Core.$a(d,0,1);a.Fa(Core.ye);g.Fa(Core.ye);f=new Quaternion;f.ci(a.X,a.Y,a.Z);e=new Quaternion;e.ci(g.X,g.Y,g.Z);e.ji(e,f,d);e.Wk(a);a.Fa(Core.Ld);if(b.Rot.t(a))return false;b.Rot=a;return true}function Xa(a,b,d,e,f){a.ib=1;a.Ac=d;a.rd=f;a.ve=e;a.ub=0;a.Zb=0;a.bd(b,1)}
function Wa(a,b,d){if(!a.ua||!a.jf)return true;if(a.ua.zf(b,d,true)!=null)return false;return true}function Va(a,b,d,e){if(b&&b.Visible){var f=false,g=d.va(b.aa());if(g<a.Lg){var j=b.Rb("gameai");if(j&&e!=""&&j!==a&&j.vb>0)f=j.Aj.indexOf(e)!=-1}if(f){a.Lg=g;a.Kg=b}for(f=0;f<b.B.length;++f)Va(a,b.B[f],d,e)}}function Ta(a,b){if(b!=null)return 10;a=b.Ra().Bf();a.Y=0;return a.qa()}function Ya(a,b){switch(b){case 0:return a.sj;case 1:return a.Jj;case 2:return a.qi;case 3:return a.Bi}return""}
AnimatorGameAI.prototype.bd=function(a,b){if(!a||a.getType()!="animatedmesh")return 0;var d=a.la;if(!d)return 0;if(d=pa(d,Ya(this,b))){a.cd(d.Begin,d.End);d.FPS!=0&&a.ai(d.FPS);a.di(b==1||b==0);return(d.End-d.Begin)*d.FPS*1E3}else{a.cd(1,1);a.di(false)}return 0};function ja(a,b,d){if(d)if(a.vb!=0){a.vb-=b;if(a.vb<0)a.vb=0;if(a.vb==0){a.Wf!=null&&a.Wf.execute(d);b=d.aa();a.ib=3;a.rd=0;a.ve=b;a.ub=0;a.Zb=500;a.bd(d,3)}else a.Yf!=null&&a.Yf.execute(d)}};CCDocument=function(){this.sd=-1;this.al="";this.zb=[];this.Rl=Scene.$i;this.Cn=320;this.Bn=200;this.qh=function(a){this.zb.push(a)};this.Af=function(){if(this.sd<0||this.sd>=this.zb.length)return null;return this.zb[this.sd]};this.Kk=function(a){for(var b=0;b<this.zb.length;++b)if(this.zb[b]===a){this.sd=b;return}}};var $=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);
base64decode=function(a){var b,d,e,f,g;f=a.length;e=0;for(g="";e<f;){do b=$[a.charCodeAt(e++)&255];while(e<f&&b==-1);if(b==-1)break;do d=$[a.charCodeAt(e++)&255];while(e<f&&d==-1);if(d==-1)break;g+=String.fromCharCode(b<<2|(d&48)>>4);do{b=a.charCodeAt(e++)&255;if(b==61)return g;b=$[b]}while(e<f&&b==-1);if(b==-1)break;g+=String.fromCharCode((d&15)<<4|(b&60)>>2);do{d=a.charCodeAt(e++)&255;if(d==61)return g;d=$[d]}while(e<f&&d==-1);if(d==-1)break;g+=String.fromCharCode((b&3)<<6|d)}return g};TriangleSelector=h();TriangleSelector.prototype.cb=h();TriangleSelector.prototype.rb=function(a,b,d){this.cb(b,d)};
TriangleSelector.prototype.zf=function(a,b,d,e){if(!a||!b)return null;var f=new Box3d;f.MinEdge=a.b();f.MaxEdge=a.b();f.oa(b);var g=[];this.rb(f,null,g);f=b.c(a);f.normalize();for(var j,m=9.999999999E8,l=b.c(a).La(),n=Math.min(a.X,b.X),p=Math.max(a.X,b.X),t=Math.min(a.Y,b.Y),k=Math.max(a.Y,b.Y),q=Math.min(a.Z,b.Z),r=Math.max(a.Z,b.Z),A=null,B=0;B<g.length;++B){var u=g[B];if(!(d&&!u.Gh().Rh(f)))if(!(n>u.pointA.X&&n>u.pointB.X&&n>u.pointC.X))if(!(p<u.pointA.X&&p<u.pointB.X&&p<u.pointC.X))if(!(t>u.pointA.Y&&
t>u.pointB.Y&&t>u.pointC.Y))if(!(k<u.pointA.Y&&k<u.pointB.Y&&k<u.pointC.Y))if(!(q>u.pointA.Z&&q>u.pointB.Z&&q>u.pointC.Z))if(!(r<u.pointA.Z&&r<u.pointB.Z&&r<u.pointC.Z))if(!(a.Sb(u.pointA)>=m&&a.Sb(u.pointB)>=m&&a.Sb(u.pointC)>=m))if(j=u.ge(a,f)){var z=j.Sb(a),D=j.Sb(b);if(z<l&&D<l&&z<m){m=z;e&&u.F(e);A=j}}}if(A)return A.b();return null};
MeshTriangleSelector=function(a,b){if(a){this.Ia=b;this.C=[];for(b=0;b<a.ha.length;++b){var d=a.ha[b];if(d)for(var e=d.Indices.length,f=0;f<e;f+=3)this.C.push(new Triangle3d(d.Vertices[d.Indices[f]].Pos,d.Vertices[d.Indices[f+1]].Pos,d.Vertices[d.Indices[f+2]].Pos))}}};MeshTriangleSelector.prototype=new TriangleSelector;
MeshTriangleSelector.prototype.cb=function(a,b){if(this.Ia.S){a=a?a.ia(this.Ia.S):this.Ia.S;var d;if(a.Jf())for(d=0;d<this.C.length;++d)b.push(this.C[d]);else if(a.Sh())for(d=0;d<this.C.length;++d)b.push(new Triangle3d(a.rc(this.C[d].pointA),a.rc(this.C[d].pointB),a.rc(this.C[d].pointC)));else for(d=0;d<this.C.length;++d)b.push(new Triangle3d(a.Db(this.C[d].pointA),a.Db(this.C[d].pointB),a.Db(this.C[d].pointC)))}};MeshTriangleSelector.prototype.rb=function(a,b,d){this.cb(b,d)};
MetaTriangleSelector=function(){this.Oc=[]};MetaTriangleSelector.prototype=new TriangleSelector;MetaTriangleSelector.prototype.cb=function(a,b){for(var d=0;d<this.Oc.length;++d)this.Oc[d].cb(a,b)};MetaTriangleSelector.prototype.rb=function(a,b,d){for(var e=0;e<this.Oc.length;++e)this.Oc[e].rb(a,b,d)};MetaTriangleSelector.prototype.clear=function(){this.Oc=[]};SOctTreeNode=function(){this.C=[];this.Box=new Box3d;this.zc=[]};
OctTreeTriangleSelector=function(a,b,d){this.gl=this.fl=0;this.xl=d==null?64:d;if(a){this.Ia=b;this.Ve=new SOctTreeNode;this.C=[];for(b=0;b<a.ha.length;++b)if(d=a.ha[b])for(var e=d.Indices.length,f=0;f<e;f+=3){var g=new Triangle3d(d.Vertices[d.Indices[f]].Pos,d.Vertices[d.Indices[f+1]].Pos,d.Vertices[d.Indices[f+2]].Pos);this.Ve.C.push(g);this.C.push(g)}Za(this,this.Ve)}};OctTreeTriangleSelector.prototype=new TriangleSelector;
function Za(a,b){++a.fl;b.Box.MinEdge=b.C[0].pointA.b();b.Box.MaxEdge=b.Box.MinEdge.b();for(var d,e=b.C.length,f=1;f<e;++f){d=b.C[f];b.Box.oa(d.pointA);b.Box.oa(d.pointB);b.Box.oa(d.pointC)}if(!b.Box.MinEdge.t(b.Box.MaxEdge)&&e>a.xl){e=b.Box.db();for(var g=b.Box.Bh(),j=new Box3d,m=0;m<8;++m){var l=[];j.MinEdge=e.b();j.MaxEdge=e.b();j.oa(g[m]);b.zc.push(new SOctTreeNode);for(f=0;f<b.C.length;++f){d=b.C[f];d.yk(j)?b.zc[m].C.push(d):l.push(d)}b.C=l;if(b.zc[m].C.length==0)b.zc[m]=null;else Za(a,b.zc[m])}}a.gl+=
b.C.length}OctTreeTriangleSelector.prototype.cb=function(a,b){MeshTriangleSelector.prototype.cb.call(this,a,b)};OctTreeTriangleSelector.prototype.rb=function(a,b,d){if(this.Ia.S){var e=new Matrix4;a=a.b();if(this.Ia){e=this.Ia.yh().b();e.Vh();e.oe(a)}e.zk();if(b)e=b.b();if(this.Ia)e=e.ia(this.Ia.yh());this.Ve&&$a(this,this.Ve,d,a,e)}};
function $a(a,b,d,e,f){if(b.Box.Qh(e)){var g=b.C.length,j;if(f.Jf())for(j=0;j<g;++j)d.push(b.C[j]);else if(f.Sh())for(j=0;j<g;++j)d.push(new Triangle3d(f.rc(b.C[j].pointA),f.rc(b.C[j].pointB),f.rc(b.C[j].pointC)));else for(j=0;j<g;++j)d.push(new Triangle3d(f.Db(b.C[j].pointA),f.Db(b.C[j].pointB),f.Db(b.C[j].pointC)));for(j=0;j<8;++j){g=b.zc[j];g!=null&&$a(a,g,d,e,f)}}};window.startCopperLichtFromFile=za;Vect3d.prototype.dotProduct=Vect3d.prototype.z;Vect3d.prototype.getHorizontalAngle=Vect3d.prototype.fe;Vect3d.prototype.crossProduct=Vect3d.prototype.Aa;Vect3d.prototype.divideThroughVect=Vect3d.prototype.sf;Vect3d.prototype.divideThisThroughVect=Vect3d.prototype.hm;Vect3d.prototype.multiplyWithVect=Vect3d.prototype.Wh;Vect3d.prototype.multiplyThisWithVect=Vect3d.prototype.le;Vect3d.prototype.multiplyThisWithScal=Vect3d.prototype.Fa;
Vect3d.prototype.multiplyWithScal=Vect3d.prototype.w;Vect3d.prototype.getLengthSQ=Vect3d.prototype.La;Vect3d.prototype.getDistanceFromSQ=Vect3d.prototype.Sb;Vect3d.prototype.getDistanceTo=Vect3d.prototype.va;Vect3d.prototype.getLength=Vect3d.prototype.qa;Vect3d.prototype.isZero=Vect3d.prototype.Nm;Vect3d.prototype.equalsByNumbers=Vect3d.prototype.Yj;Vect3d.prototype.equalsZero=Vect3d.prototype.wf;Vect3d.prototype.equals=Vect3d.prototype.t;Vect3d.prototype.setTo=Vect3d.prototype.Vb;
Vect3d.prototype.setLength=Vect3d.prototype.vc;Vect3d.prototype.getNormalized=Vect3d.prototype.xm;Vect3d.prototype.normalize=Vect3d.prototype.normalize;Vect3d.prototype.addToThis=Vect3d.prototype.R;Vect3d.prototype.add=Vect3d.prototype.add;Vect3d.prototype.crossProduct=Vect3d.prototype.Aa;Vect3d.prototype.substractFromThis=Vect3d.prototype.xc;Vect3d.prototype.substract=Vect3d.prototype.c;Vect3d.prototype.set=Vect3d.prototype.Tb;Vect3d.prototype.setTo=Vect3d.prototype.Vb;Vect3d.prototype.copyTo=Vect3d.prototype.F;
Vect3d.prototype.clone=Vect3d.prototype.b;Vect3d.prototype.toString=Vect3d.prototype.toString;Quaternion.prototype.clone=Quaternion.prototype.b;Quaternion.prototype.copyTo=Quaternion.prototype.F;Quaternion.prototype.multiplyWith=Quaternion.prototype.Mf;Quaternion.prototype.addToThis=Quaternion.prototype.R;Quaternion.prototype.slerp=Quaternion.prototype.ji;Quaternion.prototype.dotProduct=Quaternion.prototype.z;Quaternion.prototype.getMatrix=Quaternion.prototype.ik;Quaternion.prototype.toEuler=Quaternion.prototype.Wk;
Quaternion.prototype.setFromEuler=Quaternion.prototype.ci;Quaternion.prototype.normalize=Quaternion.prototype.normalize;Triangle3d.prototype.getIntersectionWithLine=Triangle3d.prototype.ge;Triangle3d.prototype.getIntersectionOfPlaneWithLine=Triangle3d.prototype.gk;Triangle3d.prototype.getNormal=Triangle3d.prototype.Fh;Triangle3d.prototype.isPointInside=Triangle3d.prototype.tc;Triangle3d.prototype.isPointInsideFast=Triangle3d.prototype.xk;Triangle3d.prototype.getPlane=Triangle3d.prototype.Gh;
Triangle3d.prototype.clone=Triangle3d.prototype.b;Triangle3d.prototype.isTotalInsideBox=Triangle3d.prototype.yk;Triangle3d.prototype.copyTo=Triangle3d.prototype.F;Matrix4.prototype.makeIdentity=Matrix4.prototype.zk;Matrix4.prototype.isIdentity=Matrix4.prototype.Jf;Matrix4.prototype.isTranslateOnly=Matrix4.prototype.Sh;Matrix4.prototype.equals=Matrix4.prototype.t;Matrix4.prototype.getTranslation=Matrix4.prototype.tk;Matrix4.prototype.getScale=Matrix4.prototype.qk;Matrix4.prototype.rotateVect=Matrix4.prototype.en;
Matrix4.prototype.rotateVect2=Matrix4.prototype.Hk;Matrix4.prototype.getRotatedVect=Matrix4.prototype.Bm;Matrix4.prototype.getTransformedVect=Matrix4.prototype.Db;Matrix4.prototype.transformVect=Matrix4.prototype.dd;Matrix4.prototype.transformVect2=Matrix4.prototype.Xk;Matrix4.prototype.getTranslatedVect=Matrix4.prototype.rc;Matrix4.prototype.translateVect=Matrix4.prototype.wn;Matrix4.prototype.transformPlane=Matrix4.prototype.vn;Matrix4.prototype.multiply=Matrix4.prototype.ia;
Matrix4.prototype.multiplyWith1x4Matrix=Matrix4.prototype.Bk;Matrix4.prototype.getInverse=Matrix4.prototype.Ch;Matrix4.prototype.makeInverse=Matrix4.prototype.Vh;Matrix4.prototype.asArray=Matrix4.prototype.Nj;Matrix4.prototype.setByIndex=Matrix4.prototype.Ik;Matrix4.prototype.clone=Matrix4.prototype.b;Matrix4.prototype.copyTo=Matrix4.prototype.F;Matrix4.prototype.buildProjectionMatrixPerspectiveFovLH=Matrix4.prototype.sh;Matrix4.prototype.buildCameraLookAtMatrixLH=Matrix4.prototype.Qj;
Matrix4.prototype.setRotationDegrees=Matrix4.prototype.wc;Matrix4.prototype.setRotationRadians=Matrix4.prototype.Qk;Matrix4.prototype.getRotationDegrees=Matrix4.prototype.Jh;Matrix4.prototype.setTranslation=Matrix4.prototype.ii;Matrix4.prototype.setScale=Matrix4.prototype.gi;Matrix4.prototype.setScaleXYZ=Matrix4.prototype.Rk;Matrix4.prototype.transformBoxEx=Matrix4.prototype.oe;Box3d.prototype.getCenter=Box3d.prototype.db;Box3d.prototype.getExtent=Box3d.prototype.Bf;Box3d.prototype.clone=Box3d.prototype.b;
Box3d.prototype.intersectsWithLine=Box3d.prototype.wk;Box3d.prototype.addInternalPoint=Box3d.prototype.Mj;Box3d.prototype.addInternalPointByVector=Box3d.prototype.oa;Box3d.prototype.intersectsWithBox=Box3d.prototype.Qh;Box3d.prototype.getEdges=Box3d.prototype.Bh;Box3d.prototype.isPointInside=Box3d.prototype.tc;Line3d.prototype.getVector=Line3d.prototype.Gf;Line3d.prototype.getLength=Line3d.prototype.qa;Core.TOLERANCE=Core.Ab;Core.radToDeg=Core.Nf;Core.degToRad=Core.Wj;Core.iszero=Core.G;
Core.isone=Core.Eb;Core.equals=Core.t;Core.clamp=Core.$a;Core.fract=Core.$j;Core.max3=Core.Ak;Core.min3=Core.Qm;Core.getBlue=Core.yf;Core.getGreen=Core.Cf;Core.getRed=Core.Ef;Core.getAlpha=Core.Ah;Core.createColor=Core.Tj;Scene.REDRAW_WHEN_SCENE_CHANGED=Scene.Bl;Scene.REDRAW_WHEN_CAM_MOVED=Scene.Al;Scene.REDRAW_EVERY_FRAME=Scene.$i;Scene.RENDER_MODE_SKYBOX=Scene.Wg;Scene.RENDER_MODE_DEFAULT=Scene.hc;Scene.RENDER_MODE_LIGHTS=Scene.Vg;Scene.RENDER_MODE_CAMERA=Scene.Ug;
Scene.RENDER_MODE_TRANSPARENT=Scene.Md;Scene.RENDER_MODE_2DOVERLAY=Scene.Re;Scene.prototype.setRedrawMode=Scene.prototype.Pk;Scene.prototype.setActiveCamera=Scene.prototype.Pf;Scene.prototype.getActiveCamera=Scene.prototype.Ea;Scene.prototype.forceRedrawNextFrame=Scene.prototype.Zj;Scene.prototype.getStartTime=Scene.prototype.Lh;Scene.prototype.registerNodeForRendering=Scene.prototype.Fb;Scene.prototype.getAllSceneNodesOfType=Scene.prototype.zh;Scene.prototype.getSceneNodeFromName=Scene.prototype.Kh;
Scene.prototype.getSceneNodeFromId=Scene.prototype.Ma;Scene.prototype.getRootSceneNode=Scene.prototype.je;Scene.prototype.registerNodeForRendering=Scene.prototype.Fb;Scene.prototype.getCurrentRenderMode=Scene.prototype.sm;Scene.prototype.setBackgroundColor=Scene.prototype.hn;Scene.prototype.getBackgroundColor=Scene.prototype.qm;Scene.prototype.setName=Scene.prototype.mn;Scene.prototype.getName=Scene.prototype.getName;Scene.prototype.getCollisionGeometry=Scene.prototype.rm;
SceneNode.prototype.getParent=SceneNode.prototype.ym;SceneNode.prototype.getAnimators=SceneNode.prototype.om;SceneNode.prototype.getAnimatorOfType=SceneNode.prototype.Rb;SceneNode.prototype.getTransformedBoundingBox=SceneNode.prototype.Ra;SceneNode.prototype.addAnimator=SceneNode.prototype.Vc;SceneNode.prototype.removeAnimator=SceneNode.prototype.Gk;SceneNode.prototype.addChild=SceneNode.prototype.Da;SceneNode.prototype.removeChild=SceneNode.prototype.removeChild;
SceneNode.prototype.getRelativeTransformation=SceneNode.prototype.Ih;SceneNode.prototype.updateAbsolutePosition=SceneNode.prototype.Ba;SceneNode.prototype.getAbsolutePosition=SceneNode.prototype.aa;SceneNode.prototype.init=SceneNode.prototype.ra;SceneNode.prototype.getAbsoluteTransformation=SceneNode.prototype.yh;Animator.prototype.getType=Animator.prototype.getType;AnimatorCameraFPS.prototype.getType=AnimatorCameraFPS.prototype.getType;AnimatorCameraFPS.prototype.lookAt=AnimatorCameraFPS.prototype.Uh;
AnimatorCameraFPS.prototype.animateNode=AnimatorCameraFPS.prototype.animateNode;AnimatorCameraModelViewer.prototype.animateNode=AnimatorCameraModelViewer.prototype.animateNode;AnimatorCameraModelViewer.prototype.getType=AnimatorCameraModelViewer.prototype.getType;AnimatorFollowPath.prototype.animateNode=AnimatorFollowPath.prototype.animateNode;AnimatorFollowPath.prototype.getType=AnimatorFollowPath.prototype.getType;AnimatorFollowPath.prototype.setOptions=AnimatorFollowPath.prototype.on;
AnimatorFollowPath.prototype.setPathToFollow=AnimatorFollowPath.prototype.Mk;AnimatorFollowPath.EFPFEM_STOP=AnimatorFollowPath.Ci;AnimatorFollowPath.EFPFEM_START_AGAIN=AnimatorFollowPath.Ae;AnimatorOnClick.prototype.getType=AnimatorOnClick.prototype.getType;AnimatorOnProximity.prototype.getType=AnimatorOnProximity.prototype.getType;AnimatorCollisionResponse.prototype.getType=AnimatorCollisionResponse.prototype.getType;AnimatorCollisionResponse.prototype.setWorld=AnimatorCollisionResponse.prototype.gb;
AnimatorCollisionResponse.prototype.getWorld=AnimatorCollisionResponse.prototype.Oh;AnimatorCollisionResponse.prototype.isFalling=AnimatorCollisionResponse.prototype.Lm;AnimatorCollisionResponse.prototype.setGravity=AnimatorCollisionResponse.prototype.kn;AnimatorCollisionResponse.prototype.getGravity=AnimatorCollisionResponse.prototype.um;Material.EMT_SOLID=Material.rg;Material.EMT_LIGHTMAP=Material.wd;Material.EMT_TRANSPARENT_ADD_COLOR=Material.sg;Material.EMT_TRANSPARENT_ALPHA_CHANNEL=Material.tg;
CopperLicht.prototype.getRenderer=CopperLicht.prototype.pk;CopperLicht.prototype.getScene=CopperLicht.prototype.Yc;CopperLicht.prototype.load=CopperLicht.prototype.load;CopperLicht.prototype.isLoading=CopperLicht.prototype.Mm;CopperLicht.prototype.draw3dScene=CopperLicht.prototype.vh;CopperLicht.prototype.gotoScene=CopperLicht.prototype.Hf;CopperLicht.prototype.getScenes=CopperLicht.prototype.Cm;CopperLicht.prototype.getMouseX=CopperLicht.prototype.he;CopperLicht.prototype.getMouseY=CopperLicht.prototype.ie;
CopperLicht.prototype.isMouseDown=CopperLicht.prototype.Lf;CopperLicht.prototype.getMouseDownX=CopperLicht.prototype.Dh;CopperLicht.prototype.getMouseDownY=CopperLicht.prototype.Eh;CopperLicht.prototype.initRenderer=CopperLicht.prototype.Km;CopperLicht.prototype.getTextureManager=CopperLicht.prototype.Gm;CopperLicht.prototype.get2DPositionFrom3DPosition=CopperLicht.prototype.nm;CopperLicht.prototype.get3DPositionFrom2DPosition=CopperLicht.prototype.bk;CopperLicht.prototype.addScene=CopperLicht.prototype.qh;
CameraSceneNode.prototype.setAspectRatio=CameraSceneNode.prototype.Qf;CameraSceneNode.prototype.getAspectRatio=CameraSceneNode.prototype.pm;CameraSceneNode.prototype.getFov=CameraSceneNode.prototype.ek;CameraSceneNode.prototype.setFov=CameraSceneNode.prototype.Lk;CameraSceneNode.prototype.setTarget=CameraSceneNode.prototype.Ub;CameraSceneNode.prototype.getTarget=CameraSceneNode.prototype.qb;CameraSceneNode.prototype.getUpVector=CameraSceneNode.prototype.Mh;CameraSceneNode.prototype.setUpVector=CameraSceneNode.prototype.sn;
CameraSceneNode.prototype.getNearValue=CameraSceneNode.prototype.mk;CameraSceneNode.prototype.setNearValue=CameraSceneNode.prototype.nn;CameraSceneNode.prototype.getFarValue=CameraSceneNode.prototype.dk;CameraSceneNode.prototype.setFarValue=CameraSceneNode.prototype.jn;CameraSceneNode.prototype.createClone=CameraSceneNode.prototype.createClone;BillboardSceneNode.prototype.getBoundingBox=BillboardSceneNode.prototype.getBoundingBox;BillboardSceneNode.prototype.getType=BillboardSceneNode.prototype.getType;
BillboardSceneNode.prototype.render=BillboardSceneNode.prototype.render;BillboardSceneNode.prototype.getMaterialCount=BillboardSceneNode.prototype.getMaterialCount;BillboardSceneNode.prototype.getMaterial=BillboardSceneNode.prototype.getMaterial;BillboardSceneNode.prototype.createClone=BillboardSceneNode.prototype.createClone;BillboardSceneNode.prototype.setSize=BillboardSceneNode.prototype.rn;BillboardSceneNode.prototype.getSize=BillboardSceneNode.prototype.Fm;
SkyBoxSceneNode.prototype.createClone=SkyBoxSceneNode.prototype.createClone;SkyBoxSceneNode.prototype.getType=SkyBoxSceneNode.prototype.getType;Overlay2DSceneNode.prototype.createClone=Overlay2DSceneNode.prototype.createClone;Overlay2DSceneNode.prototype.getType=Overlay2DSceneNode.prototype.getType;Overlay2DSceneNode.prototype.setShowImage=Overlay2DSceneNode.prototype.qn;Overlay2DSceneNode.prototype.setShowBackgroundColor=Overlay2DSceneNode.prototype.pn;
Overlay2DSceneNode.prototype.set2DPosition=Overlay2DSceneNode.prototype.gn;Overlay2DSceneNode.prototype.setText=Overlay2DSceneNode.prototype.hi;AnimatedMeshSceneNode.prototype.getBoundingBox=AnimatedMeshSceneNode.prototype.getBoundingBox;AnimatedMeshSceneNode.prototype.getType=AnimatedMeshSceneNode.prototype.getType;AnimatedMeshSceneNode.prototype.createClone=AnimatedMeshSceneNode.prototype.createClone;AnimatedMeshSceneNode.prototype.setAnimationSpeed=AnimatedMeshSceneNode.prototype.ai;
AnimatedMeshSceneNode.prototype.setLoopMode=AnimatedMeshSceneNode.prototype.di;AnimatedMeshSceneNode.prototype.setFrameLoop=AnimatedMeshSceneNode.prototype.cd;AnimatedMeshSceneNode.prototype.setCurrentFrame=AnimatedMeshSceneNode.prototype.Jk;AnimatedMeshSceneNode.prototype.getFrameNr=AnimatedMeshSceneNode.prototype.fk;AnimatedMeshSceneNode.prototype.setMinimalUpdateDelay=AnimatedMeshSceneNode.prototype.ln;AnimatedMeshSceneNode.prototype.getNamedAnimationCount=AnimatedMeshSceneNode.prototype.lk;
AnimatedMeshSceneNode.prototype.getNamedAnimationInfo=AnimatedMeshSceneNode.prototype.wm;AnimatedMeshSceneNode.prototype.setAnimation=AnimatedMeshSceneNode.prototype.bd;PathSceneNode.prototype.getBoundingBox=PathSceneNode.prototype.getBoundingBox;PathSceneNode.prototype.getType=PathSceneNode.prototype.getType;PathSceneNode.prototype.createClone=PathSceneNode.prototype.createClone;PathSceneNode.prototype.getPathNodePosition=PathSceneNode.prototype.nk;PathSceneNode.prototype.getPointOnPath=PathSceneNode.prototype.Hh;
MeshSceneNode.prototype.getMesh=MeshSceneNode.prototype.kk;MeshSceneNode.prototype.getMaterialCount=MeshSceneNode.prototype.getMaterialCount;MeshSceneNode.prototype.getMaterial=MeshSceneNode.prototype.getMaterial;MeshSceneNode.prototype.createClone=MeshSceneNode.prototype.createClone;MeshSceneNode.prototype.setMesh=MeshSceneNode.prototype.ei;MeshSceneNode.prototype.getBoundingBox=MeshSceneNode.prototype.getBoundingBox;Plane3d.ISREL3D_FRONT=Plane3d.pl;Plane3d.ISREL3D_BACK=Plane3d.ol;
Plane3d.ISREL3D_PLANAR=Plane3d.ql;Plane3d.prototype.clone=Plane3d.prototype.b;Plane3d.prototype.recalculateD=Plane3d.prototype.Of;Plane3d.prototype.getMemberPoint=Plane3d.prototype.jk;Plane3d.prototype.setPlane=Plane3d.prototype.fi;Plane3d.prototype.setPlaneFrom3Points=Plane3d.prototype.Nk;Plane3d.prototype.normalize=Plane3d.prototype.normalize;Plane3d.prototype.classifyPointRelation=Plane3d.prototype.$l;Plane3d.prototype.getIntersectionWithPlanes=Plane3d.prototype.Df;
Plane3d.prototype.getIntersectionWithPlane=Plane3d.prototype.hk;Plane3d.prototype.getIntersectionWithLine=Plane3d.prototype.ge;Plane3d.prototype.getDistanceTo=Plane3d.prototype.va;Plane3d.prototype.isFrontFacing=Plane3d.prototype.Rh;Mesh.prototype.AddMeshBuffer=Mesh.prototype.Ua;Mesh.prototype.GetMeshBuffers=Mesh.prototype.ll;Mesh.prototype.GetPolyCount=Mesh.prototype.Fi;MeshBuffer.prototype.update=MeshBuffer.prototype.update;MeshBuffer.prototype.recalculateBoundingBox=MeshBuffer.prototype.ad;
Renderer.prototype.getWidth=Renderer.prototype.fb;Renderer.prototype.getWebGL=Renderer.prototype.Im;Renderer.prototype.getHeight=Renderer.prototype.eb;Renderer.prototype.drawMesh=Renderer.prototype.uf;Renderer.prototype.setMaterial=Renderer.prototype.Rf;Renderer.prototype.drawMeshBuffer=Renderer.prototype.vf;Renderer.prototype.beginScene=Renderer.prototype.Pj;Renderer.prototype.endScene=Renderer.prototype.Xj;Renderer.prototype.clearDynamicLights=Renderer.prototype.Sj;
Renderer.prototype.setProjection=Renderer.prototype.Ok;Renderer.prototype.getProjection=Renderer.prototype.ok;Renderer.prototype.setView=Renderer.prototype.Sk;Renderer.prototype.getView=Renderer.prototype.uk;Renderer.prototype.getWorld=Renderer.prototype.Oh;Renderer.prototype.setWorld=Renderer.prototype.gb;Renderer.prototype.createMaterialType=Renderer.prototype.cm;Renderer.prototype.getGLProgramFromMaterialType=Renderer.prototype.tm;Renderer.prototype.draw2DRectangle=Renderer.prototype.uh;
Renderer.prototype.draw2DImage=Renderer.prototype.tf;Renderer.prototype.deleteTexture=Renderer.prototype.de;Renderer.prototype.createTextureFrom2DCanvas=Renderer.prototype.Vj;TextureManager.prototype.getTexture=TextureManager.prototype.rk;TextureManager.prototype.getTextureCount=TextureManager.prototype.sk;TextureManager.prototype.getCountOfTexturesToLoad=TextureManager.prototype.ck;Texture.prototype.getWidth=Texture.prototype.fb;Texture.prototype.getHeight=Texture.prototype.eb;
Texture.prototype.getURL=Texture.prototype.Hm;Texture.prototype.isLoaded=Texture.prototype.Kf;Texture.prototype.getWebGLTexture=Texture.prototype.Nh;Texture.prototype.getImage=Texture.prototype.vm;TriangleSelector.prototype.getAllTriangles=TriangleSelector.prototype.cb;TriangleSelector.prototype.getTrianglesInBox=TriangleSelector.prototype.rb;TriangleSelector.prototype.getCollisionPointWithLine=TriangleSelector.prototype.zf;MeshTriangleSelector.prototype.getAllTriangles=MeshTriangleSelector.prototype.cb;
MeshTriangleSelector.prototype.getTrianglesInBox=MeshTriangleSelector.prototype.rb;MetaTriangleSelector.prototype.getAllTriangles=MetaTriangleSelector.prototype.cb;MetaTriangleSelector.prototype.getTrianglesInBox=MetaTriangleSelector.prototype.rb;OctTreeTriangleSelector.prototype.getAllTriangles=OctTreeTriangleSelector.prototype.cb;OctTreeTriangleSelector.prototype.getTrianglesInBox=OctTreeTriangleSelector.prototype.rb;

