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