Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

pannellum.htm 53 KiB

12 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!DOCTYPE HTML>
  2. <!-- Pannellum 0.1, http://pannellum.sf.net/ -->
  3. <html><head><title>pannellum</title><meta charset=utf-8><style type="text/css">html{height:100%;background-color:#666;background-image:-webkit-linear-gradient(-45deg,#999 24%,#666 26%,#666 49%,#999 51%,#999 74%,#666 76%,#666);background-image:-moz-linear-gradient(-45deg,#999 24%,#666 26%,#666 49%,#999 51%,#999 74%,#666 76%,#666);background-image:-o-linear-gradient(-45deg,#999 24%,#666 26%,#666 49%,#999 51%,#999 74%,#666 76%,#666);background-image:linear-gradient(-45deg,#999 24%,#666 26%,#666 49%,#999 51%,#999 74%,#666 76%,#666);background-size:20px 20px}body{margin:0;padding:0;overflow:hidden;cursor:default;width:100%}.grab{cursor:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAABfklEQVQ4y+XUuy9DURwH8O89rea299YtJkIYTBKPpWIzEGFgMBBJiUekm79BREIqBolFB5F4DEYxiH+ARAyYaEgaCQmD1+292ur9Wgy37T2DUXzPcpLz+yTnrRC/j8BfRUr1r1Eg7nsMzEoGWdKgaIfBNbSGPg/ozyOEUX3XN1ZS4+oKVBGYaTd7PsXVwDvZ+CYS9eYyK3JQZWhYKegpNbnCFOHMk+x88X1d0GZFDrobudZUFd8TvXXZyQia0ZBRAbwq/XYbTqGnaEo2QggdGyGfeCYw5K8FkAlO6MC2be9LN0JPrpMcNacs/uTMsXhL8RU6EHMwvNcUG3wl07xx6MqIXWOtOt12eNMb1WpWUT1Jcit/R3KHNceeiDDS5/RO9B0xCVIXxjNeZMsxLqFIECLBj7sy8kTDQofkcAlCXZy2ikmWUVNLSK8RQaApbBeKUMyuPHJPzQMRRvrERZbz4WtopTX+sreydN/X9YACHBTg7LZ8xJkpe2n/62OR5xuNS51tq2OATAAAAABJRU5ErkJggg==') 12 8,default}.grabbing{cursor:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAABGUlEQVQ4y2P8z0A6YGIY1TRYNDHaM2YzquKQ/I8GGTh5pgk85Tgs+jnmC9s3/nXCe1mTMNSgcBgZ/BgWGH298N/s65z////L/cj8vfK/0DcGZzyauPuUP+l+KfzxHwqO///+//9/qw8Mnjg1MfCy/nr7//t/VHDlP/MvBhvcmvg5fvz5jw78fsh+5v7OnoXTefwPT2FoevH/9/9N/wXOIKtDCfLfi6d8Rw9dcQYWhvU/fu7DGeQMAlxfHmDYdeY/10cGQZzO+8/A1ZrxDVXLj//aX5iT8QT5fwYGRaGvqJpCv/Gvwxu5/xn+M/A9PY+kpfEX/2UGdnQ1LOge5+y6b27wguEfw3+G///+r9H4mPb/J0a6HC1YIAAAFlVTMQM6+Y4AAAAASUVORK5CYII=') 12 8,default}.sprite{background-image:url('data:image/png;base64,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')}.noselect{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}#container{cursor:inherit}#page{width:100%;height:100%}#zoomcontrols{position:absolute;top:2px;left:2px;width:27px;height:54px;cursor:pointer}#zoom_in{width:100%;height:50%;position:absolute;top:0;background-position:0 -27px}#zoom_in:hover{background-position:0 -54px}#zoom_out{width:100%;height:50%;position:absolute;bottom:0;background-position:-27px -27px}#zoom_out:hover{background-position:-27px -54px}#about_button{position:absolute;top:2px;right:2px;width:27px;height:27px;background-position:-54px -27px;cursor:pointer}#about_button:hover{background-position:-54px -54px}#about_box{position:absolute;top:50%;left:50%;width:194px;height:121px;margin:-75px 0 0 -100px;background-color:#eee;background-color:rgba(255,255,255,.85);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border-style:solid;border-width:3px;border-color:#000;display:none;text-align:center;padding-top:23px}#close_button{float:right;background-position:-54px -98px;width:17px;height:17px;margin-right:2px;margin-top:-21px;cursor:pointer}#close_button:hover{background-position:-54px -81px}#pannellum_logo{background-position:0 0;position:absolute;top:2px;right:29px;width:81px;height:27px;display:none;cursor:pointer}#pannellum_logo a:link{display:block;width:81px;height:27px}#panorama_info{position:absolute;bottom:2px;width:100%}#title_box{position:relative;width:auto;text-align:left;font-family:serif;font-size:20px;background-color:rgba(0,0,0,0.7);display:table;padding-left:5px;padding-right:15px;color:#fff;margin-bottom:3px}#author_box{position:relative;width:auto;text-align:left;font-family:serif;font-size:12px;background-color:rgba(0,0,0,0.7);display:table;padding-left:5px;padding-right:30px;color:#fff;height:15px}#license{float:right;margin-left:8px;height:15px}#load_box{position:absolute;top:50%;left:50%;width:194px;height:144px;margin:-75px 0 0 -100px;background-color:#eee;background-color:rgba(255,255,255,.85);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border-style:solid;border-width:3px;border-color:#000;text-align:center;font-family:serif;font-size:20px;display:none}#load_indicator{position:absolute;top:50%;left:50%;width:20px;height:20px;margin:-10px 0 0 -10px;background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCI+PHJlY3QgaGVpZ2h0PSIxMCIgd2lkdGg9IjEwIj48YW5pbWF0ZU1vdGlvbiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgcGF0aD0iTSAwIDAgTCAxMCAwIEwgMTAgMTAgTCAwIDEwIEwgMCAwIi8+PC9yZWN0Pjwvc3ZnPg==')}#load_button{position:absolute;top:50%;left:50%;width:200px;height:100px;margin:-50px 0 0 -100px;background-color:#222;background-color:rgba(0,0,0,.7);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;text-align:center;font-family:serif;font-size:20px;display:none;color:#fff;cursor:pointer}#load_button:hover{background-color:#eee;background-color:rgba(255,255,255,.7);color:#000}#load_button p{display:table-cell;vertical-align:middle}#nojavascript{color:#000;font-family:serif;font-size:15px;position:absolute;top:50%;left:50%;width:194px;height:144px;margin:-75px 0 0 -100px;background-color:#eee;background-color:rgba(255,255,255,.85);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border-style:solid;border-width:3px;border-color:#000;display:table;text-align:center}#nojavascript p{display:table-cell;vertical-align:middle;padding:0 5px 0 5px}#pannellum_logo_about{position:relative;background-position:0 0;width:81px;height:27px;margin-left:auto;margin-right:auto}#nocanvas{color:#000;font-family:serif;font-size:15px;position:absolute;top:50%;left:50%;width:194px;height:144px;margin:-75px 0 0 -100px;background-color:#eee;background-color:rgba(255,255,255,.85);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border-style:solid;border-width:3px;border-color:#000;display:none;text-align:center}#nocanvas p{display:table-cell;vertical-align:middle;padding:0 5px 0 5px}#fullwindowtoggle_button{position:absolute;bottom:2px;right:2px;width:27px;height:27px;background-position:-27px -81px;cursor:pointer}#fullwindowtoggle_button:hover{background-position:-27px -108px}#fullwindowtoggle_button_active{position:absolute;bottom:2px;right:2px;width:27px;height:27px;background-position:0 -81px;cursor:pointer}#fullwindowtoggle_button_active:hover{background-position:0 -108px}</style></head><body class=noselect><div id=page><div id=container></div><noscript><div id=nojavascript class=noselect><p>Javascript is required to view this panorama.<br>(It could be worse; you could need a plugin.)</p></div></noscript><div id=panorama_info class=noselect><div id=title_box></div><div id=author_box></div></div><div id=zoomcontrols><div id=zoom_in onclick="zoomIn()" class=sprite></div><div id=zoom_out onclick="zoomOut()" class=sprite></div></div><div id=about_button onclick="about()" class=sprite></div><div id=pannellum_logo class=sprite><a href="http://pannellum.sf.net/" target=_blank></a></div><div id=fullwindowtoggle_button onclick="toggleFullWindow()" class=sprite></div><div id=load_box class=noselect><p>Loading...<div id=load_indicator></div></div><div id=load_button onclick="load()" class=noselect><p>Load<br>Panorama<p></div><div id=nocanvas class=noselect><p>A browser supporting WebGL (and the canvas element) is required to view this panorama.</p></div><div id=about_box class=noselect><div id=close_button class=sprite onclick="about_box.style.display='none'"></div><a href="http://pannellum.sf.net/" target=_blank><div id=pannellum_logo_about class=sprite></div></a>Version 0.1<p>Licensing:<br><a href="//www.gnu.org/licenses/lgpl-2.1.txt" target=_blank>GNU LGPL v2.1</a></div><script type="text/javascript">"yes"==getURLParameter("logo")&&(document.getElementById("pannellum_logo").style.display="inline");getURLParameter("title")&&(document.getElementById("title_box").innerHTML=getURLParameter("title"));getURLParameter("author")&&(document.getElementById("author_box").innerHTML="by "+getURLParameter("author"));
  4. if(getURLParameter("license")){var licenseType;switch(parseInt(getURLParameter("license"))){case 0:licenseType="by";break;case 1:licenseType="by-sa";break;case 2:licenseType="by-nd";break;case 3:licenseType="by-nc";break;case 4:licenseType="by-nc-sa";break;case 5:licenseType="by-nc-nd"}document.getElementById("author_box").innerHTML+='<a rel="license" target="_blank" href="http://creativecommons.org/licenses/'+licenseType+'/3.0/"><div id="license"></div></a>';var license=document.getElementById("license").style;
  5. license.backgroundImage="url('http://i.creativecommons.org/l/"+licenseType+"/3.0/80x15.png')";license.width="80px"}var popoutmode=!1;"yes"==getURLParameter("popout")&&(document.getElementById("fullwindowtoggle_button").id="fullwindowtoggle_button_active",popoutmode=!0);var camera,scene,renderer,renderGL,fov=70,texture_placeholder,isUserInteracting=!1,onMouseDownMouseX=0,onMouseDownMouseY=0,lon=0,onMouseDownLon=0,lat=0,onMouseDownLat=0,phi=0,theta=0,fullWindowActive=!1,isTimedOut=!1,about_box=document.getElementById("about_box");
  6. if("yes"==getURLParameter("autoload")||"yes"==getURLParameter("popoutautoload"))"yes"!=getURLParameter("popoutautoload")&&(document.getElementById("load_box").load_box.style.display="inline"),init(),animate();else{var load_button=document.getElementById("load_button");load_button.style.display="table"}
  7. function init(){var a,c;a=document.getElementById("container");camera=new THREE.Camera(fov,window.innerWidth/window.innerHeight,1,1100);scene=new THREE.Scene;var d=new Image,e=new THREE.Texture(d);d.onload=function(){e.needsUpdate=!0;c=new THREE.Mesh(new THREE.Sphere(500,60,40),new THREE.MeshBasicMaterial({map:e}));c.scale.x=-1;try{scene.addObject(c)}catch(b){load_box.style.display="none",document.getElementById("nocanvas").style.display="table"}try{renderer=new THREE.WebGLRenderer,renderer.setSize(window.innerWidth,
  8. window.innerHeight),renderer.initWebGLObjects(scene)}catch(d){load_box.style.display="none",document.getElementById("nocanvas").style.display="table"}a.appendChild(renderer.domElement);document.addEventListener("mousedown",onDocumentMouseDown,!1);document.addEventListener("mousemove",onDocumentMouseMove,!1);document.addEventListener("mouseup",onDocumentMouseUp,!1);document.addEventListener("mousewheel",onDocumentMouseWheel,!1);document.addEventListener("DOMMouseScroll",onDocumentMouseWheel,!1);document.addEventListener("onresize",
  9. onDocumentResize,!1);document.onkeydown=onDocumentKeyPress;renderInit();setTimeout("isTimedOut = true",500)};d.src=getURLParameter("panorama");document.getElementById("page").className="grab"}function onDocumentMouseDown(a){a.preventDefault();isUserInteracting=!0;onPointerDownPointerX=a.clientX;onPointerDownPointerY=a.clientY;onPointerDownLon=lon;onPointerDownLat=lat;document.getElementById("page").className="grabbing"}
  10. function onDocumentMouseMove(a){isUserInteracting&&(lon=0.1*(onPointerDownPointerX-a.clientX)+onPointerDownLon,lat=0.1*(a.clientY-onPointerDownPointerY)+onPointerDownLat,animate())}function onDocumentMouseUp(){isUserInteracting=!1;document.getElementById("page").className="grab"}
  11. function onDocumentMouseWheel(a){35<=fov&&105>=fov&&(a.wheelDeltaY?fov-=0.05*a.wheelDeltaY:a.wheelDelta?fov-=0.05*a.wheelDelta:a.detail&&(fov+=1.5*a.detail));35>fov?fov=35:105<fov&&(fov=105);camera.projectionMatrix=THREE.Matrix4.makePerspective(fov,window.innerWidth/window.innerHeight,1,1100);render()}
  12. function onDocumentKeyPress(a){keynumber=a.keycode;a.which&&(keynumber=a.which);109==keynumber&&zoomOut();107==keynumber&&zoomIn();27==keynumber&&(!0==fullWindowActive||!0==popoutmode)&&toggleFullWindow()}window.onresize=function(){onDocumentResize()};
  13. function onDocumentResize(){try{camera.aspect=window.innerWidth/window.innerHeight,renderer.setSize(window.innerWidth,window.innerHeight),camera.projectionMatrix=THREE.Matrix4.makePerspective(fov,window.innerWidth/window.innerHeight,1,1100),render()}catch(a){}}function animate(){render();isUserInteracting&&requestAnimationFrame(animate)}
  14. function render(){try{lat=Math.max(-85,Math.min(85,lat)),phi=(90-lat)*Math.PI/180,theta=lon*Math.PI/180,camera.target.position.x=500*Math.sin(phi)*Math.cos(theta),camera.target.position.y=500*Math.cos(phi),camera.target.position.z=500*Math.sin(phi)*Math.sin(theta),renderer.render(scene,camera)}catch(a){}}
  15. function renderInit(){try{camera.target.x=0,camera.target.y=0,camera.target.z=0,renderer.render(scene,camera),isTimedOut?document.getElementById("load_box").style.display="none":requestAnimationFrame(renderInit)}catch(a){}}function getURLParameter(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=RegExp("[\\?&]"+a+"=([^&#]*)").exec(unescape(window.location.href));return null==a?"":a[1]}
  16. function toggleFullWindow(){if(scene)if(!1==fullWindowActive)try{var a=document.getElementById("page");a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen();fullWindowActive=!0}catch(c){if("yes"!=getURLParameter("popout")){var a="width="+screen.width+",height="+screen.height+",left=0,top=0",d=window.location.href+"&popout=yes";try{camera.aspect=window.innerWidth/window.innerHeight,d+="&popoutautoload=yes"}catch(e){}window.open(d,null,
  17. a)}else window.close()}else document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),"yes"==getURLParameter("popout")&&window.close(),document.getElementById("fullwindowtoggle_button_active").id="fullwindowtoggle_button",fullWindowActive=!1}
  18. function zoomIn(){40<=fov&&(fov-=5,camera.projectionMatrix=THREE.Matrix4.makePerspective(fov,window.innerWidth/window.innerHeight,1,1100),render());40>fov?fov=40:100<fov&&(fov=100)}function zoomOut(){100>=fov&&(fov+=5,camera.projectionMatrix=THREE.Matrix4.makePerspective(fov,window.innerWidth/window.innerHeight,1,1100),render());40>fov?fov=40:100<fov&&(fov=100)}function about(){about_box.style.display="inline"==about_box.style.display?"none":"inline"}
  19. function load(){document.getElementById("load_button").style.display="none";document.getElementById("load_box").style.display="inline";init();animate()}var THREE=THREE||{};window.Int32Array||(window.Int32Array=Array,window.Float32Array=Array);THREE.Color=function(a){this.setHex(a)};
  20. THREE.Color.prototype={autoUpdate:!0,setHex:function(a){this.hex=~~a&16777215;this.autoUpdate&&(this.updateRGB(),this.updateStyleString())},updateRGB:function(){this.r=(this.hex>>16&255)/255;this.g=(this.hex>>8&255)/255;this.b=(this.hex&255)/255},updateStyleString:function(){this.__styleString="rgb("+~~(255*this.r)+","+~~(255*this.g)+","+~~(255*this.b)+")"},clone:function(){return new THREE.Color(this.hex)}};THREE.Vector3=function(a,c,d){this.set(a||0,c||0,d||0)};
  21. THREE.Vector3.prototype={set:function(a,c,d){this.x=a;this.y=c;this.z=d;return this},copy:function(a){this.set(a.x,a.y,a.z);return this},addSelf:function(a){this.set(this.x+a.x,this.y+a.y,this.z+a.z);return this},sub:function(a,c){this.set(a.x-c.x,a.y-c.y,a.z-c.z);return this},cross:function(a,c){this.set(a.y*c.z-a.z*c.y,a.z*c.x-a.x*c.z,a.x*c.y-a.y*c.x);return this},crossSelf:function(a){var c=this.x,d=this.y,e=this.z;this.set(d*a.z-e*a.y,e*a.x-c*a.z,c*a.y-d*a.x);return this},multiplyScalar:function(a){this.set(this.x*
  22. a,this.y*a,this.z*a);return this},divideScalar:function(a){this.set(this.x/a,this.y/a,this.z/a);return this},length:function(){return Math.sqrt(this.lengthSq())},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},normalize:function(){var a=this.length();0<a?this.multiplyScalar(1/a):this.set(0,0,0);return this},isZero:function(){return 1.0E-4>Math.abs(this.x)&&1.0E-4>Math.abs(this.y)&&1.0E-4>Math.abs(this.z)},clone:function(){return new THREE.Vector3(this.x,this.y,this.z)}};
  23. THREE.Vector4=function(a,c,d,e){this.set(a||0,c||0,d||0,e||1)};THREE.Vector4.prototype={set:function(a,c,d,e){this.x=a;this.y=c;this.z=d;this.w=e;return this},copy:function(a){this.set(a.x,a.y,a.z,a.w||1);return this},divideScalar:function(a){this.set(this.x/a,this.y/a,this.z/a,this.w/a);return this}};THREE.Matrix3=function(){this.m=[]};THREE.Matrix3.prototype={transposeIntoArray:function(a){var c=this.m;a[0]=c[0];a[1]=c[3];a[2]=c[6];a[3]=c[1];a[4]=c[4];a[5]=c[7];a[6]=c[2];a[7]=c[5];a[8]=c[8];return this}};
  24. THREE.Matrix4=function(a,c,d,e,b,f,g,h,l,o,p,m,r,q,i,n){this.set(a||1,c||0,d||0,e||0,b||0,f||1,g||0,h||0,l||0,o||0,p||1,m||0,r||0,q||0,i||0,n||1);this.flat=Array(16);this.m33=new THREE.Matrix3};
  25. THREE.Matrix4.prototype={set:function(a,c,d,e,b,f,g,h,l,o,p,m,r,q,i,n){this.n11=a;this.n12=c;this.n13=d;this.n14=e;this.n21=b;this.n22=f;this.n23=g;this.n24=h;this.n31=l;this.n32=o;this.n33=p;this.n34=m;this.n41=r;this.n42=q;this.n43=i;this.n44=n;return this},copy:function(a){this.set(a.n11,a.n12,a.n13,a.n14,a.n21,a.n22,a.n23,a.n24,a.n31,a.n32,a.n33,a.n34,a.n41,a.n42,a.n43,a.n44);return this},lookAt:function(a,c,d){var e=THREE.Matrix4.__v1,b=THREE.Matrix4.__v2,f=THREE.Matrix4.__v3;f.sub(a,c).normalize();
  26. 0===f.length()&&(f.z=1);e.cross(d,f).normalize();0===e.length()&&(f.x+=1.0E-4,e.cross(d,f).normalize());b.cross(f,e).normalize();this.n11=e.x;this.n12=b.x;this.n13=f.x;this.n21=e.y;this.n22=b.y;this.n23=f.y;this.n31=e.z;this.n32=b.z;this.n33=f.z;return this},multiplyVector3:function(a){var c=a.x,d=a.y,e=a.z,b=1/(this.n41*c+this.n42*d+this.n43*e+this.n44);a.x=(this.n11*c+this.n12*d+this.n13*e+this.n14)*b;a.y=(this.n21*c+this.n22*d+this.n23*e+this.n24)*b;a.z=(this.n31*c+this.n32*d+this.n33*e+this.n34)*
  27. b;return a},multiply:function(a,c){var d=a.n11,e=a.n12,b=a.n13,f=a.n14,g=a.n21,h=a.n22,l=a.n23,o=a.n24,p=a.n31,m=a.n32,r=a.n33,q=a.n34,i=a.n41,n=a.n42,v=a.n43,u=a.n44,j=c.n11,E=c.n12,J=c.n13,F=c.n14,L=c.n21,M=c.n22,N=c.n23,O=c.n24,x=c.n31,s=c.n32,z=c.n33,k=c.n34;this.n11=d*j+e*L+b*x;this.n12=d*E+e*M+b*s;this.n13=d*J+e*N+b*z;this.n14=d*F+e*O+b*k+f;this.n21=g*j+h*L+l*x;this.n22=g*E+h*M+l*s;this.n23=g*J+h*N+l*z;this.n24=g*F+h*O+l*k+o;this.n31=p*j+m*L+r*x;this.n32=p*E+m*M+r*s;this.n33=p*J+m*N+r*z;this.n34=
  28. p*F+m*O+r*k+q;this.n41=i*j+n*L+v*x;this.n42=i*E+n*M+v*s;this.n43=i*J+n*N+v*z;this.n44=i*F+n*O+v*k+u;return this},multiplyToArray:function(a,c,d){this.multiply(a,c);d[0]=this.n11;d[1]=this.n21;d[2]=this.n31;d[3]=this.n41;d[4]=this.n12;d[5]=this.n22;d[6]=this.n32;d[7]=this.n42;d[8]=this.n13;d[9]=this.n23;d[10]=this.n33;d[11]=this.n43;d[12]=this.n14;d[13]=this.n24;d[14]=this.n34;d[15]=this.n44;return this},multiplyScalar:function(a){this.n11*=a;this.n12*=a;this.n13*=a;this.n14*=a;this.n21*=a;this.n22*=
  29. a;this.n23*=a;this.n24*=a;this.n31*=a;this.n32*=a;this.n33*=a;this.n34*=a;this.n41*=a;this.n42*=a;this.n43*=a;this.n44*=a;return this},determinant:function(){var a=this.n11,c=this.n12,d=this.n13,e=this.n14,b=this.n21,f=this.n22,g=this.n23,h=this.n24,l=this.n31,o=this.n32,p=this.n33,m=this.n34,r=this.n41,q=this.n42,i=this.n43,n=this.n44;return e*g*o*r-d*h*o*r-e*f*p*r+c*h*p*r+d*f*m*r-c*g*m*r-e*g*l*q+d*h*l*q+e*b*p*q-a*h*p*q-d*b*m*q+a*g*m*q+e*f*l*i-c*h*l*i-e*b*o*i+a*h*o*i+c*b*m*i-a*f*m*i-d*f*l*n+c*g*
  30. l*n+d*b*o*n-a*g*o*n-c*b*p*n+a*f*p*n},flattenToArray:function(a){a[0]=this.n11;a[1]=this.n21;a[2]=this.n31;a[3]=this.n41;a[4]=this.n12;a[5]=this.n22;a[6]=this.n32;a[7]=this.n42;a[8]=this.n13;a[9]=this.n23;a[10]=this.n33;a[11]=this.n43;a[12]=this.n14;a[13]=this.n24;a[14]=this.n34;a[15]=this.n44;return a},setPosition:function(a){this.n14=a.x;this.n24=a.y;this.n34=a.z;return this},setRotationFromEuler:function(a){var c=a.x,d=a.y,e=a.z,a=Math.cos(c),c=Math.sin(c),b=Math.cos(d),d=Math.sin(d),f=Math.cos(e),
  31. e=Math.sin(e),g=a*d,h=c*d;this.n11=b*f;this.n12=-b*e;this.n13=d;this.n21=h*f+a*e;this.n22=-h*e+a*f;this.n23=-c*b;this.n31=-g*f+c*e;this.n32=g*e+c*f;this.n33=a*b;return this},scale:function(a){var c=a.x,d=a.y,a=a.z;this.n11*=c;this.n12*=d;this.n13*=a;this.n21*=c;this.n22*=d;this.n23*=a;this.n31*=c;this.n32*=d;this.n33*=a;this.n41*=c;this.n42*=d;this.n43*=a;return this},extractRotation:function(a,c){var d=1/c.x,e=1/c.y,b=1/c.z;this.n11=a.n11*d;this.n21=a.n21*d;this.n31=a.n31*d;this.n12=a.n12*e;this.n22=
  32. a.n22*e;this.n32=a.n32*e;this.n13=a.n13*b;this.n23=a.n23*b;this.n33=a.n33*b}};
  33. THREE.Matrix4.makeInvert=function(a,c){var d=a.n11,e=a.n12,b=a.n13,f=a.n14,g=a.n21,h=a.n22,l=a.n23,o=a.n24,p=a.n31,m=a.n32,r=a.n33,q=a.n34,i=a.n41,n=a.n42,v=a.n43,u=a.n44;void 0===c&&(c=new THREE.Matrix4);c.n11=l*q*n-o*r*n+o*m*v-h*q*v-l*m*u+h*r*u;c.n12=f*r*n-b*q*n-f*m*v+e*q*v+b*m*u-e*r*u;c.n13=b*o*n-f*l*n+f*h*v-e*o*v-b*h*u+e*l*u;c.n14=f*l*m-b*o*m-f*h*r+e*o*r+b*h*q-e*l*q;c.n21=o*r*i-l*q*i-o*p*v+g*q*v+l*p*u-g*r*u;c.n22=b*q*i-f*r*i+f*p*v-d*q*v-b*p*u+d*r*u;c.n23=f*l*i-b*o*i-f*g*v+d*o*v+b*g*u-d*l*u;c.n24=
  34. b*o*p-f*l*p+f*g*r-d*o*r-b*g*q+d*l*q;c.n31=h*q*i-o*m*i+o*p*n-g*q*n-h*p*u+g*m*u;c.n32=f*m*i-e*q*i-f*p*n+d*q*n+e*p*u-d*m*u;c.n33=b*o*i-f*h*i+f*g*n-d*o*n-e*g*u+d*h*u;c.n34=f*h*p-e*o*p-f*g*m+d*o*m+e*g*q-d*h*q;c.n41=l*m*i-h*r*i-l*p*n+g*r*n+h*p*v-g*m*v;c.n42=e*r*i-b*m*i+b*p*n-d*r*n-e*p*v+d*m*v;c.n43=b*h*i-e*l*i-b*g*n+d*l*n+e*g*v-d*h*v;c.n44=e*l*p-b*h*p+b*g*m-d*l*m-e*g*r+d*h*r;c.multiplyScalar(1/a.determinant());return c};
  35. THREE.Matrix4.makeInvert3x3=function(a){var c=a.m33,d=c.m,e=a.n33*a.n22-a.n32*a.n23,b=-a.n33*a.n21+a.n31*a.n23,f=a.n32*a.n21-a.n31*a.n22,g=-a.n33*a.n12+a.n32*a.n13,h=a.n33*a.n11-a.n31*a.n13,l=-a.n32*a.n11+a.n31*a.n12,o=a.n23*a.n12-a.n22*a.n13,p=-a.n23*a.n11+a.n21*a.n13,m=a.n22*a.n11-a.n21*a.n12,a=a.n11*e+a.n21*g+a.n31*o;if(0==a)throw"matrix not invertible";a=1/a;d[0]=a*e;d[1]=a*b;d[2]=a*f;d[3]=a*g;d[4]=a*h;d[5]=a*l;d[6]=a*o;d[7]=a*p;d[8]=a*m;return c};
  36. THREE.Matrix4.makeFrustum=function(a,c,d,e,b,f){var g;g=new THREE.Matrix4;g.n11=2*b/(c-a);g.n12=0;g.n13=(c+a)/(c-a);g.n14=0;g.n21=0;g.n22=2*b/(e-d);g.n23=(e+d)/(e-d);g.n24=0;g.n31=0;g.n32=0;g.n33=-(f+b)/(f-b);g.n34=-2*f*b/(f-b);g.n41=0;g.n42=0;g.n43=-1;g.n44=0;return g};THREE.Matrix4.makePerspective=function(a,c,d,e){var b,a=d*Math.tan(a*Math.PI/360);b=-a;return THREE.Matrix4.makeFrustum(b*c,a*c,b,a,d,e)};THREE.Matrix4.__v1=new THREE.Vector3;THREE.Matrix4.__v2=new THREE.Vector3;
  37. THREE.Matrix4.__v3=new THREE.Vector3;
  38. THREE.Object3D=function(){this.parent=void 0;this.children=[];this.up=new THREE.Vector3(0,1,0);this.position=new THREE.Vector3;this.rotation=new THREE.Vector3;this.scale=new THREE.Vector3(1,1,1);this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixRotationWorld=new THREE.Matrix4;this.matrixWorldNeedsUpdate=this.matrixAutoUpdate=!0;this.quaternion=new THREE.Quaternion;this.useQuaternion=!1;this.boundRadius=0;this.boundRadiusScale=1;this.visible=!0;
  39. this._vector=new THREE.Vector3;this.name=""};
  40. THREE.Object3D.prototype={addChild:function(a){if(-1===this.children.indexOf(a)){void 0!==a.parent&&a.parent.removeChild(a);a.parent=this;this.children.push(a);for(var c=this;void 0!==c.parent;)c=c.parent;void 0!==c&&c instanceof THREE.Scene&&c.addChildRecurse(a)}},updateMatrix:function(){this.matrix.setPosition(this.position);this.useQuaternion?this.matrix.setRotationFromQuaternion(this.quaternion):this.matrix.setRotationFromEuler(this.rotation);if(1!==this.scale.x||1!==this.scale.y||1!==this.scale.z)this.matrix.scale(this.scale),
  41. this.boundRadiusScale=Math.max(this.scale.x,Math.max(this.scale.y,this.scale.z));this.matrixWorldNeedsUpdate=!0},update:function(a,c,d){this.matrixAutoUpdate&&this.updateMatrix();if(this.matrixWorldNeedsUpdate||c)a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixRotationWorld.extractRotation(this.matrixWorld,this.scale),this.matrixWorldNeedsUpdate=!1,c=!0;for(var a=0,e=this.children.length;a<e;a++)this.children[a].update(this.matrixWorld,c,d)}};
  42. THREE.Quaternion=function(a,c,d,e){this.set(a||0,c||0,d||0,void 0!==e?e:1)};THREE.Quaternion.prototype={set:function(a,c,d,e){this.x=a;this.y=c;this.z=d;this.w=e;return this}};THREE.Vertex=function(a){this.position=a||new THREE.Vector3};
  43. THREE.Face3=function(a,c,d,e,b,f){this.a=a;this.b=c;this.c=d;this.normal=e instanceof THREE.Vector3?e:new THREE.Vector3;this.vertexNormals=e instanceof Array?e:[];this.color=b instanceof THREE.Color?b:new THREE.Color;this.vertexColors=b instanceof Array?b:[];this.vertexTangents=[];this.materials=f instanceof Array?f:[f];this.centroid=new THREE.Vector3};THREE.UV=function(a,c){this.set(a||0,c||0)};THREE.UV.prototype={set:function(a,c){this.u=a;this.v=c;return this}};
  44. THREE.Geometry=function(){this.id="Geometry"+THREE.GeometryIdCounter++;this.vertices=[];this.colors=[];this.faces=[];this.edges=[];this.faceUvs=[[]];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1};
  45. THREE.Geometry.prototype={computeCentroids:function(){var a,c,d;a=0;for(c=this.faces.length;a<c;a++)d=this.faces[a],d.centroid.set(0,0,0),d instanceof THREE.Face3?(d.centroid.addSelf(this.vertices[d.a].position),d.centroid.addSelf(this.vertices[d.b].position),d.centroid.addSelf(this.vertices[d.c].position),d.centroid.divideScalar(3)):d instanceof THREE.Face4&&(d.centroid.addSelf(this.vertices[d.a].position),d.centroid.addSelf(this.vertices[d.b].position),d.centroid.addSelf(this.vertices[d.c].position),
  46. d.centroid.addSelf(this.vertices[d.d].position),d.centroid.divideScalar(4))},computeFaceNormals:function(a){var c,d,e,b,f,g,h=new THREE.Vector3,l=new THREE.Vector3;e=0;for(b=this.faces.length;e<b;e++){f=this.faces[e];if(a&&f.vertexNormals.length){h.set(0,0,0);c=0;for(d=f.vertexNormals.length;c<d;c++)h.addSelf(f.vertexNormals[c]);h.divideScalar(3)}else c=this.vertices[f.a],d=this.vertices[f.b],g=this.vertices[f.c],h.sub(g.position,d.position),l.sub(c.position,d.position),h.crossSelf(l);h.isZero()||
  47. h.normalize();f.normal.copy(h)}},computeVertexNormals:function(){var a,c,d,e;if(void 0==this.__tmpVertices){e=this.__tmpVertices=Array(this.vertices.length);a=0;for(c=this.vertices.length;a<c;a++)e[a]=new THREE.Vector3;a=0;for(c=this.faces.length;a<c;a++)d=this.faces[a],d instanceof THREE.Face3?d.vertexNormals=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3]:d instanceof THREE.Face4&&(d.vertexNormals=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3])}else{e=this.__tmpVertices;
  48. a=0;for(c=this.vertices.length;a<c;a++)e[a].set(0,0,0)}a=0;for(c=this.faces.length;a<c;a++)d=this.faces[a],d instanceof THREE.Face3?(e[d.a].addSelf(d.normal),e[d.b].addSelf(d.normal),e[d.c].addSelf(d.normal)):d instanceof THREE.Face4&&(e[d.a].addSelf(d.normal),e[d.b].addSelf(d.normal),e[d.c].addSelf(d.normal),e[d.d].addSelf(d.normal));a=0;for(c=this.vertices.length;a<c;a++)e[a].normalize();a=0;for(c=this.faces.length;a<c;a++)d=this.faces[a],d instanceof THREE.Face3?(d.vertexNormals[0].copy(e[d.a]),
  49. d.vertexNormals[1].copy(e[d.b]),d.vertexNormals[2].copy(e[d.c])):d instanceof THREE.Face4&&(d.vertexNormals[0].copy(e[d.a]),d.vertexNormals[1].copy(e[d.b]),d.vertexNormals[2].copy(e[d.c]),d.vertexNormals[3].copy(e[d.d]))}};THREE.GeometryIdCounter=0;THREE.Camera=function(a,c,d,e,b){THREE.Object3D.call(this);this.fov=a||50;this.aspect=c||1;this.near=d||0.1;this.far=e||2E3;this.target=b||new THREE.Object3D;this.useTarget=!0;this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=null;this.updateProjectionMatrix()};
  50. THREE.Camera.prototype=new THREE.Object3D;THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.supr=THREE.Object3D.prototype;THREE.Camera.prototype.updateProjectionMatrix=function(){this.projectionMatrix=THREE.Matrix4.makePerspective(this.fov,this.aspect,this.near,this.far)};
  51. THREE.Camera.prototype.update=function(a,c,d){if(this.useTarget)this.matrix.lookAt(this.position,this.target.position,this.up),this.matrix.setPosition(this.position),a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix),THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse),c=!0;else if(this.matrixAutoUpdate&&this.updateMatrix(),c||this.matrixWorldNeedsUpdate)a?this.matrixWorld.multiply(a,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldNeedsUpdate=
  52. !1,c=!0,THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);for(a=0;a<this.children.length;a++)this.children[a].update(this.matrixWorld,c,d)};THREE.Material=function(a){this.id=THREE.MaterialCounter.value++;a=a||{};this.opacity=void 0!==a.opacity?a.opacity:1;this.transparent=void 0!==a.transparent?a.transparent:!1;this.blending=void 0!==a.blending?a.blending:THREE.NormalBlending;this.depthTest=void 0!==a.depthTest?a.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;
  53. THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=4;THREE.MaterialCounter={value:0};THREE.CubeReflectionMapping=function(){};THREE.CubeRefractionMapping=function(){};THREE.LatitudeReflectionMapping=function(){};THREE.LatitudeRefractionMapping=function(){};THREE.SphericalReflectionMapping=function(){};THREE.SphericalRefractionMapping=function(){};
  54. THREE.UVMapping=function(){};
  55. THREE.MeshBasicMaterial=function(a){THREE.Material.call(this,a);a=a||{};this.color=void 0!==a.color?new THREE.Color(a.color):new THREE.Color(16777215);this.map=void 0!==a.map?a.map:null;this.lightMap=void 0!==a.lightMap?a.lightMap:null;this.envMap=void 0!==a.envMap?a.envMap:null;this.combine=void 0!==a.combine?a.combine:THREE.MultiplyOperation;this.reflectivity=void 0!==a.reflectivity?a.reflectivity:1;this.refractionRatio=void 0!==a.refractionRatio?a.refractionRatio:0.98;this.shading=void 0!==a.shading?
  56. a.shading:THREE.SmoothShading;this.wireframe=void 0!==a.wireframe?a.wireframe:!1;this.wireframeLinewidth=void 0!==a.wireframeLinewidth?a.wireframeLinewidth:1;this.wireframeLinecap=void 0!==a.wireframeLinecap?a.wireframeLinecap:"round";this.wireframeLinejoin=void 0!==a.wireframeLinejoin?a.wireframeLinejoin:"round";this.vertexColors=void 0!==a.vertexColors?a.vertexColors:!1;this.skinning=void 0!==a.skinning?a.skinning:!1;this.morphTargets=void 0!==a.morphTargets?a.morphTargets:!1};
  57. THREE.MeshBasicMaterial.prototype=new THREE.Material;THREE.MeshBasicMaterial.prototype.constructor=THREE.MeshBasicMaterial;THREE.Texture=function(a,c,d,e,b,f){this.image=a;this.mapping=void 0!==c?c:new THREE.UVMapping;this.wrapS=void 0!==d?d:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==e?e:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==b?b:THREE.LinearFilter;this.minFilter=void 0!==f?f:THREE.LinearMipMapLinearFilter;this.needsUpdate=!1};THREE.MultiplyOperation=0;THREE.MixOperation=1;
  58. THREE.RepeatWrapping=0;THREE.ClampToEdgeWrapping=1;THREE.MirroredRepeatWrapping=2;THREE.NearestFilter=3;THREE.NearestMipMapNearestFilter=4;THREE.NearestMipMapLinearFilter=5;THREE.LinearFilter=6;THREE.LinearMipMapNearestFilter=7;THREE.LinearMipMapLinearFilter=8;THREE.ByteType=9;THREE.UnsignedByteType=10;THREE.ShortType=11;THREE.UnsignedShortType=12;THREE.IntType=13;THREE.UnsignedIntType=14;THREE.FloatType=15;THREE.AlphaFormat=16;THREE.RGBFormat=17;THREE.RGBAFormat=18;THREE.LuminanceFormat=19;
  59. THREE.LuminanceAlphaFormat=20;
  60. THREE.Mesh=function(a,c){THREE.Object3D.call(this);this.geometry=a;this.materials=c&&c.length?c:[c];this.overdraw=this.doubleSided=this.flipSided=!1;if(this.geometry&&(this.geometry.boundingSphere||this.geometry.computeBoundingSphere(),this.boundRadius=a.boundingSphere.radius,this.geometry.morphTargets.length)){this.morphTargetBase=-1;this.morphTargetForcedOrder=[];this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var d=0;d<this.geometry.morphTargets.length;d++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[d].name]=
  61. d}};THREE.Mesh.prototype=new THREE.Object3D;THREE.Mesh.prototype.constructor=THREE.Mesh;THREE.Mesh.prototype.supr=THREE.Object3D.prototype;THREE.Scene=function(){THREE.Object3D.call(this);this.matrixAutoUpdate=!1;this.objects=[];this.__objectsAdded=[]};THREE.Scene.prototype=new THREE.Object3D;THREE.Scene.prototype.constructor=THREE.Scene;THREE.Scene.prototype.supr=THREE.Object3D.prototype;THREE.Scene.prototype.addChild=function(a){this.supr.addChild.call(this,a);this.addChildRecurse(a)};
  62. THREE.Scene.prototype.addChildRecurse=function(a){!(a instanceof THREE.Camera)&&-1===this.objects.indexOf(a)&&(this.objects.push(a),this.__objectsAdded.push(a));for(var c=0;c<a.children.length;c++)this.addChildRecurse(a.children[c])};THREE.Scene.prototype.addObject=THREE.Scene.prototype.addChild;
  63. THREE.ShaderChunk={map_pars_fragment:"#ifdef USE_MAP\nvarying vec2 vUv;\nuniform sampler2D map;\n#endif",map_pars_vertex:"#ifdef USE_MAP\nvarying vec2 vUv;\n#endif",map_fragment:"#ifdef USE_MAP\ngl_FragColor = gl_FragColor * texture2D( map, vUv );\n#endif",map_vertex:"#ifdef USE_MAP\nvUv = uv;\n#endif",default_vertex:"#ifndef USE_MORPHTARGETS\n#ifndef USE_SKINNING\ngl_Position = projectionMatrix * mvPosition;\n#endif\n#endif"};
  64. THREE.UniformsUtils={clone:function(a){var c,d,e,b={};for(c in a)for(d in b[c]={},a[c])e=a[c][d],b[c][d]=e instanceof THREE.Color||e instanceof THREE.Vector3||e instanceof THREE.Texture?e.clone():e;return b}};
  65. THREE.UniformsLib={common:{diffuse:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},map:{type:"t",value:0,texture:null},lightMap:{type:"t",value:2,texture:null},envMap:{type:"t",value:1,texture:null},useRefract:{type:"i",value:0},reflectivity:{type:"f",value:1},refractionRatio:{type:"f",value:0.98},combine:{type:"i",value:0},fogDensity:{type:"f",value:2.5E-4},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2E3},fogColor:{type:"c",value:new THREE.Color(16777215)},morphTargetInfluences:{type:"f",
  66. value:0}}};
  67. THREE.ShaderLib={basic:{uniforms:THREE.UniformsLib.common,fragmentShader:["uniform vec3 diffuse;\nuniform float opacity;",THREE.ShaderChunk.map_pars_fragment,THREE.ShaderChunk.lightmap_pars_fragment,THREE.ShaderChunk.envmap_pars_fragment,"void main() {\ngl_FragColor = vec4( diffuse, opacity );",THREE.ShaderChunk.map_fragment,THREE.ShaderChunk.lightmap_fragment,THREE.ShaderChunk.envmap_fragment,"}"].join("\n"),vertexShader:[THREE.ShaderChunk.map_pars_vertex,THREE.ShaderChunk.lightmap_pars_vertex,THREE.ShaderChunk.envmap_pars_vertex,
  68. "void main() {\nvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",THREE.ShaderChunk.map_vertex,THREE.ShaderChunk.lightmap_vertex,THREE.ShaderChunk.envmap_vertex,THREE.ShaderChunk.default_vertex,"}"].join("\n")}};
  69. THREE.WebGLRenderer=function(a){function c(a,d){var c;"fragment"==a?c=b.createShader(b.FRAGMENT_SHADER):"vertex"==a&&(c=b.createShader(b.VERTEX_SHADER));b.shaderSource(c,d);b.compileShader(c);return!b.getShaderParameter(c,b.COMPILE_STATUS)?(console.error(b.getShaderInfoLog(c)),console.error(d),null):c}function d(a){switch(a){case THREE.NearestFilter:case THREE.NearestMipMapNearestFilter:case THREE.NearestMipMapLinearFilter:return b.NEAREST;default:return b.LINEAR}}var e=this,b,f=document.createElement("canvas"),
  70. g=[],h=null,l=null,o=null,p=null,m=null,r=null,q=0,i=0,n=0,v=0,u=[new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4],j=new THREE.Matrix4,E=new Float32Array(16),J=new Float32Array(16),F=new THREE.Vector4,a=a||{};stencil=!1;antialias=void 0!==a.antialias?a.antialias:!1;clearColor=void 0!==a.clearColor?new THREE.Color(a.clearColor):new THREE.Color(0);clearAlpha=void 0!==a.clearAlpha?a.clearAlpha:0;this.data={vertices:0,faces:0,drawCalls:0};this.domElement=
  71. f;this.sortObjects=this.autoClear=!0;(function(a,d,c,e){try{if(!(b=f.getContext("experimental-webgl",{antialias:a,stencil:e})))throw"Error creating WebGL context.";}catch(g){console.error(g)}console.log(navigator.userAgent+" | "+b.getParameter(b.VERSION)+" | "+b.getParameter(b.VENDOR)+" | "+b.getParameter(b.RENDERER)+" | "+b.getParameter(b.SHADING_LANGUAGE_VERSION));b.clearColor(0,0,0,1);b.clearDepth(1);b.enable(b.DEPTH_TEST);b.depthFunc(b.LEQUAL);b.frontFace(b.CCW);b.cullFace(b.BACK);b.enable(b.CULL_FACE);
  72. b.enable(b.BLEND);b.blendEquation(b.FUNC_ADD);b.blendFunc(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA);b.clearColor(d.r,d.g,d.b,c)})(antialias,clearColor,clearAlpha,stencil);this.context=b;this.setSize=function(a,b){f.width=a;f.height=b;this.setViewport(0,0,f.width,f.height)};this.setViewport=function(a,d,c,e){q=a;i=d;n=c;v=e;b.viewport(q,i,n,v)};this.clear=function(){b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT)};this.initMaterial=function(a){var d,e=THREE.ShaderLib.basic;a.uniforms=
  73. THREE.UniformsUtils.clone(e.uniforms);a.vertexShader=e.vertexShader;a.fragmentShader=e.fragmentShader;a:{var f=a.fragmentShader,h=a.vertexShader,s=a.uniforms,z=a.attributes,k={map:!!a.map,envMap:!!a.envMap,lightMap:!!a.lightMap},t,j,e=[];e.push("basic");for(t in k)e.push(t),e.push(k[t]);e=e.join();t=0;for(j=g.length;t<j;t++)if(g[t].code==e){e=g[t].program;break a}t=b.createProgram();prefix_fragment=["#ifdef GL_ES\nprecision highp float;\n#endif",k.map?"#define USE_MAP":"",k.envMap?"#define USE_ENVMAP":
  74. "",k.lightMap?"#define USE_LIGHTMAP":"",k.vertexColors?"#define USE_COLOR":"","uniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n"].join("\n");prefix_vertex=[0<b.getParameter(b.MAX_VERTEX_TEXTURE_IMAGE_UNITS)?"#define VERTEX_TEXTURES":"",k.map?"#define USE_MAP":"",k.envMap?"#define USE_ENVMAP":"",k.lightMap?"#define USE_LIGHTMAP":"",k.sizeAttenuation?"#define USE_SIZEATTENUATION":"","uniform mat4 objectMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\nuniform mat4 cameraInverseMatrix;\nattribute vec3 position;\nattribute vec2 uv;\n"].join("\n");
  75. b.attachShader(t,c("fragment",prefix_fragment+f));b.attachShader(t,c("vertex",prefix_vertex+h));b.linkProgram(t);b.getProgramParameter(t,b.LINK_STATUS)||console.error("Could not initialise shader\nVALIDATE_STATUS: "+b.getProgramParameter(t,b.VALIDATE_STATUS)+", gl error ["+b.getError()+"]");t.uniforms={};t.attributes={};var i,l,f="viewMatrix,modelViewMatrix,projectionMatrix,objectMatrix,cameraPosition,cameraInverseMatrix".split(",");for(i in s)f.push(i);i=f;s=0;for(f=i.length;s<f;s++)h=i[s],t.uniforms[h]=
  76. b.getUniformLocation(t,h);f=["position","uv"];for(l in z)f.push(l);l=f;z=0;for(i=l.length;z<i;z++)s=l[z],t.attributes[s]=b.getAttribLocation(t,s);g.push({program:t,code:e});e=t}a.program=e;e=a.program.attributes;b.enableVertexAttribArray(e.position);for(d in a.attributes)0<=e[d]&&b.enableVertexAttribArray(e[d])};this.render=function(a,c,f,g){var x,s,z,k;e.data.vertices=0;e.data.faces=0;e.data.drawCalls=0;c.matrixAutoUpdate&&c.update(void 0,!0);a.update(void 0,!1,c);c.matrixWorldInverse.flattenToArray(J);
  77. c.projectionMatrix.flattenToArray(E);j.multiply(c.projectionMatrix,c.matrixWorldInverse);u[0].set(j.n41-j.n11,j.n42-j.n12,j.n43-j.n13,j.n44-j.n14);u[1].set(j.n41+j.n11,j.n42+j.n12,j.n43+j.n13,j.n44+j.n14);u[2].set(j.n41+j.n21,j.n42+j.n22,j.n43+j.n23,j.n44+j.n24);u[3].set(j.n41-j.n21,j.n42-j.n22,j.n43-j.n23,j.n44-j.n24);u[4].set(j.n41-j.n31,j.n42-j.n32,j.n43-j.n33,j.n44-j.n34);u[5].set(j.n41+j.n31,j.n42+j.n32,j.n43+j.n33,j.n44+j.n34);for(k=0;6>k;k++)s=u[k],s.divideScalar(Math.sqrt(s.x*s.x+s.y*s.y+
  78. s.z*s.z));this.initWebGLObjects(a);f&&!f.__webglFramebuffer&&(void 0===f.depthBuffer&&(f.depthBuffer=!0),void 0===f.stencilBuffer&&(f.stencilBuffer=!0),f.__webglFramebuffer=b.createFramebuffer(),f.__webglRenderbuffer=b.createRenderbuffer(),f.__webglTexture=b.createTexture(),b.bindTexture(b.TEXTURE_2D,f.__webglTexture),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,paramThreeToGL(f.wrapS)),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,paramThreeToGL(f.wrapT)),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,
  79. paramThreeToGL(f.magFilter)),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,paramThreeToGL(f.minFilter)),b.texImage2D(b.TEXTURE_2D,0,paramThreeToGL(f.format),f.width,f.height,0,paramThreeToGL(f.format),paramThreeToGL(f.type),null),b.bindRenderbuffer(b.RENDERBUFFER,f.__webglRenderbuffer),b.bindFramebuffer(b.FRAMEBUFFER,f.__webglFramebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,f.__webglTexture,0),f.depthBuffer&&!f.stencilBuffer?(b.renderbufferStorage(b.RENDERBUFFER,
  80. b.DEPTH_COMPONENT16,f.width,f.height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,f.__webglRenderbuffer)):f.depthBuffer&&f.stencilBuffer?(b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_STENCIL,f.width,f.height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.RENDERBUFFER,f.__webglRenderbuffer)):b.renderbufferStorage(b.RENDERBUFFER,b.RGBA4,f.width,f.height),b.bindTexture(b.TEXTURE_2D,null),b.bindRenderbuffer(b.RENDERBUFFER,null),b.bindFramebuffer(b.FRAMEBUFFER,
  81. null));f?(k=f.__webglFramebuffer,s=f.width,f=f.height):(k=null,s=n,f=v);k!=l&&(b.bindFramebuffer(b.FRAMEBUFFER,k),b.viewport(q,i,s,f),l=k);(this.autoClear||g)&&this.clear();g=a.__webglObjects.length;for(f=0;f<g;f++)if(s=a.__webglObjects[f],k=s.object,k.visible){if(!(x=!(k instanceof THREE.Mesh)))a:{z=k.matrixWorld;for(var t=-k.geometry.boundingSphere.radius*Math.max(k.scale.x,Math.max(k.scale.y,k.scale.z)),G=0;6>G;G++)if(x=u[G].x*z.n14+u[G].y*z.n24+u[G].z*z.n34+u[G].w,x<=t){x=!1;break a}x=!0}if(x){k.matrixWorld.flattenToArray(k._objectMatrixArray);
  82. x=k;x._modelViewMatrix.multiplyToArray(c.matrixWorldInverse,x.matrixWorld,x._modelViewMatrixArray);THREE.Matrix4.makeInvert3x3(x._modelViewMatrix).transposeIntoArray(x._normalMatrixArray);var B=void 0,t=s.object,G=s.opaque,K=s.transparent;K.count=0;x=G.count=0;for(z=t.materials.length;x<z;x++)if(B=t.materials[x]){var H=B.transparent?K:G;H.list[H.count]=B;H.count+=1}s.render=!0;this.sortObjects&&(F.copy(k.position),j.multiplyVector3(F),s.z=F.z)}else s.render=!1}else s.render=!1;f=THREE.NormalBlending;
  83. f!=m&&(b.blendEquationSeparate(b.FUNC_ADD,b.FUNC_ADD),b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.ONE,b.ONE_MINUS_SRC_ALPHA),m=f);for(f=0;f<g;f++)if(s=a.__webglObjects[f],s.render){k=s.object;c=s.buffer;s=s.opaque;x=k;o!=x.doubleSided&&(x.doubleSided?b.disable(b.CULL_FACE):b.enable(b.CULL_FACE),o=x.doubleSided);p!=x.flipSided&&(x.flipSided?b.frontFace(b.CW):b.frontFace(b.CCW),p=x.flipSided);for(x=0;x<s.count;x++)if(z=s.list[x],t=z.depthTest,r!=t&&(t?b.enable(b.DEPTH_TEST):b.disable(b.DEPTH_TEST),
  84. r=t),t=c,G=k,0!=z.opacity){var K=void 0,C=z,H=G;C.program||e.initMaterial(C,H);var B=C.program,Q=B.uniforms,R=C.uniforms;B!=h&&(b.useProgram(B),h=B);b.uniformMatrix4fv(Q.projectionMatrix,!1,E);if(C instanceof THREE.MeshBasicMaterial){var I=R;I.diffuse.value=C.color;I.opacity.value=C.opacity;I.map.texture=C.map;I.lightMap.texture=C.lightMap;I.envMap.texture=C.envMap;I.reflectivity.value=C.reflectivity;I.refractionRatio.value=C.refractionRatio;I.combine.value=C.combine;I.useRefract.value=C.envMap&&
  85. C.envMap.mapping instanceof THREE.CubeRefractionMapping}var I=B,A=C=void 0,y=void 0,w=void 0,D=void 0;for(C in R)if(D=I.uniforms[C])if(A=R[C],w=A.type,y=A.value,"i"==w)b.uniform1i(D,y);else if("f"==w)b.uniform1f(D,y);else if("fv1"==w)b.uniform1fv(D,y);else if("fv"==w)b.uniform3fv(D,y);else if("v2"==w)b.uniform2f(D,y.x,y.y);else if("v3"==w)b.uniform3f(D,y.x,y.y,y.z);else if("v4"==w)b.uniform4f(D,y.x,y.y,y.z,y.w);else if("c"==w)b.uniform3f(D,y.r,y.g,y.b);else if("t"==w&&(b.uniform1i(D,y),A=A.texture))if(A.image instanceof
  86. Array&&6==A.image.length)setCubeTexture(A,y);else{if(A.needsUpdate){A.__webglInit?(b.bindTexture(b.TEXTURE_2D,A.__webglTexture),b.texSubImage2D(b.TEXTURE_2D,0,0,0,b.RGBA,b.UNSIGNED_BYTE,A.image)):(A.__webglTexture=b.createTexture(),b.bindTexture(b.TEXTURE_2D,A.__webglTexture),b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,A.image),A.__webglInit=!0);var w=b.TEXTURE_2D,D=A,P=A.image;0==(P.width&P.width-1)&&0==(P.height&P.height-1)?(b.texParameteri(w,b.TEXTURE_WRAP_S,paramThreeToGL(D.wrapS)),
  87. b.texParameteri(w,b.TEXTURE_WRAP_T,paramThreeToGL(D.wrapT)),b.texParameteri(w,b.TEXTURE_MAG_FILTER,paramThreeToGL(D.magFilter)),b.texParameteri(w,b.TEXTURE_MIN_FILTER,paramThreeToGL(D.minFilter)),b.generateMipmap(w)):(b.texParameteri(w,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(w,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.texParameteri(w,b.TEXTURE_MAG_FILTER,d(D.magFilter)),b.texParameteri(w,b.TEXTURE_MIN_FILTER,d(D.minFilter)));b.bindTexture(b.TEXTURE_2D,null);A.needsUpdate=!1}b.activeTexture(b.TEXTURE0+
  88. y);b.bindTexture(b.TEXTURE_2D,A.__webglTexture)}b.uniformMatrix4fv(Q.modelViewMatrix,!1,H._modelViewMatrixArray);b.uniformMatrix3fv(Q.normalMatrix,!1,H._normalMatrixArray);B=B.attributes;!z.morphTargets&&0<=B.position&&(b.bindBuffer(b.ARRAY_BUFFER,t.__webglVertexBuffer),b.vertexAttribPointer(B.position,3,b.FLOAT,!1,0,0));if(z.attributes)for(K in z.attributes)0<=B[K]&&(H=z.attributes[K],b.bindBuffer(b.ARRAY_BUFFER,H.buffer),b.vertexAttribPointer(B[K],H.size,b.FLOAT,!1,0,0));0<=B.uv&&(t.__webglUVBuffer?
  89. (b.bindBuffer(b.ARRAY_BUFFER,t.__webglUVBuffer),b.vertexAttribPointer(B.uv,2,b.FLOAT,!1,0,0),b.enableVertexAttribArray(B.uv)):b.disableVertexAttribArray(B.uv));G instanceof THREE.Mesh&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,t.__webglFaceBuffer),b.drawElements(b.TRIANGLES,t.__webglFaceCount,b.UNSIGNED_SHORT,0),e.data.vertices+=t.__webglFaceCount,e.data.faces+=t.__webglFaceCount/3,e.data.drawCalls++)}}};this.initWebGLObjects=function(a){a.__webglObjects||(a.__webglObjects=[],a.__webglObjectsImmediate=
  90. []);for(;a.__objectsAdded.length;){var c=a.__objectsAdded[0],d=a,e=void 0,f=void 0,g=void 0;void 0==c._modelViewMatrix&&(c._modelViewMatrix=new THREE.Matrix4,c._normalMatrixArray=new Float32Array(9),c._modelViewMatrixArray=new Float32Array(16),c._objectMatrixArray=new Float32Array(16),c.matrixWorld.flattenToArray(c._objectMatrixArray));if(c instanceof THREE.Mesh){f=c.geometry;if(void 0==f.geometryGroups){var g=f,h=void 0,k=void 0,i=void 0,j=void 0,l=void 0,m=void 0,q={};g.geometryGroups={};i=0;for(j=
  91. g.faces.length;i<j;i++){for(var l=g.faces[i],n=m=l.materials,o=[],h=0,k=n.length;h<k;h++)void 0==n[h]?o.push("undefined"):o.push(n[h].id);h=o.join("_");void 0==q[h]&&(q[h]={hash:h,counter:0});k=q[h].hash+"_"+q[h].counter;void 0==g.geometryGroups[k]&&(g.geometryGroups[k]={faces:[],materials:m,vertices:0});l=l instanceof THREE.Face3?3:4;65535<g.geometryGroups[k].vertices+l&&(q[h].counter+=1,k=q[h].hash+"_"+q[h].counter,void 0==g.geometryGroups[k]&&(g.geometryGroups[k]={faces:[],materials:m,vertices:0}));
  92. g.geometryGroups[k].faces.push(i);g.geometryGroups[k].vertices+=l}}for(e in f.geometryGroups){g=f.geometryGroups[e];if(!g.__webglVertexBuffer){i=g;i.__webglVertexBuffer=b.createBuffer();i.__webglUVBuffer=b.createBuffer();i.__webglFaceBuffer=b.createBuffer();for(var i=g,j=c,p=void 0,q=m=0,l=j.geometry,n=l.faces,o=i.faces,h=0,k=o.length;h<k;h++)p=o[h],p=n[p],p instanceof THREE.Face3&&(m+=3,q+=1);h=j;p=p=void 0;o=[];k=0;for(n=h.materials.length;k<n;k++)(p=h.materials[k])&&o.push(p);h=o;a:{o=h.length;
  93. for(k=0;k<o;k++)if(n=h[k],n.map||n.lightMap||n instanceof THREE.MeshShaderMaterial){h=!0;break a}h=!1}i.__vertexArray=new Float32Array(3*m);if(h){if(0<l.faceUvs.length||0<l.faceVertexUvs.length)i.__uvArray=new Float32Array(2*m);if(1<l.faceUvs.length||1<l.faceVertexUvs.length)i.__uv2Array=new Float32Array(2*m)}i.__faceArray=new Uint16Array(3*q+(j.geometry.edgeFaces?6*j.geometry.edgeFaces.length:0));i.__uvType=h;i.__webglFaceCount=3*q+(j.geometry.edgeFaces?6*j.geometry.edgeFaces.length:0);f.__dirtyVertices=
  94. !0;f.__dirtyMorphTargets=!0;f.__dirtyElements=!0;f.__dirtyUvs=!0;f.__dirtyNormals=!0;f.__dirtyTangents=!0;f.__dirtyColors=!0}d.__webglObjects.push({buffer:g,object:c,opaque:{list:[],count:0},transparent:{list:[],count:0}})}}a.__objectsAdded.splice(0,1)}c=0;for(d=a.__webglObjects.length;c<d;c++)if(e=a.__webglObjects[c].object,i=f=void 0,e instanceof THREE.Mesh){g=e.geometry;for(f in g.geometryGroups){j=g.geometryGroups[f];m=!1;for(i in j.__webglCustomAttributes)if(j.__webglCustomAttributes[i].needsUpdate){m=
  95. !0;break}if(g.__dirtyVertices||g.__dirtyMorphTargets||g.__dirtyElements||g.__dirtyUvs||g.__dirtyNormals||g.__dirtyColors||g.__dirtyTangents||m){for(var m=b.DYNAMIC_DRAW,r=void 0,u=void 0,y=void 0,w=void 0,v=l=void 0,o=n=k=h=0,p=j.__vertexArray,F=j.__uvArray,E=j.__faceArray,q=j.__uvType,r=e.geometry,J=r.__dirtyVertices,T=r.__dirtyElements,U=r.__dirtyUvs,S=r.vertices,V=j.faces,X=r.faces,W=r.faceVertexUvs[0],r=0,u=V.length;r<u;r++)if(y=V[r],w=X[y],W&&(l=W[y]),w instanceof THREE.Face3){J&&(y=S[w.a].position,
  96. v=S[w.b].position,w=S[w.c].position,p[k]=y.x,p[k+1]=y.y,p[k+2]=y.z,p[k+3]=v.x,p[k+4]=v.y,p[k+5]=v.z,p[k+6]=w.x,p[k+7]=w.y,p[k+8]=w.z,k+=9);if(U&&void 0!==l&&q)for(w=0;3>w;w++)y=l[w],F[n]=y.u,F[n+1]=y.v,n+=2;T&&(E[o]=h,E[o+1]=h+1,E[o+2]=h+2,o+=3,h+=3)}J&&(b.bindBuffer(b.ARRAY_BUFFER,j.__webglVertexBuffer),b.bufferData(b.ARRAY_BUFFER,p,m));U&&0<n&&(b.bindBuffer(b.ARRAY_BUFFER,j.__webglUVBuffer),b.bufferData(b.ARRAY_BUFFER,F,m));T&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,j.__webglFaceBuffer),b.bufferData(b.ELEMENT_ARRAY_BUFFER,
  97. E,m))}}g.__dirtyVertices=!1;g.__dirtyMorphTargets=!1;g.__dirtyElements=!1;g.__dirtyUvs=!1;g.__dirtyNormals=!1;g.__dirtyTangents=!1;g.__dirtyColors=!1}}};
  98. THREE.Sphere=function(a,c,d){THREE.Geometry.call(this);for(var d=d||6,e,b=Math.PI,f=Math.max(3,c||8),g=Math.max(2,d),d=[],c=0;c<g+1;c++){e=c/g;var h=a*Math.cos(e*b),l=a*Math.sin(e*b),o=[],p=0;for(e=0;e<f;e++){var m=2*e/f,r=l*Math.sin(m*b),m=l*Math.cos(m*b);(0==c||c==g)&&0<e||(p=this.vertices.push(new THREE.Vertex(new THREE.Vector3(m,h,r)))-1);o.push(p)}d.push(o)}for(var q,i,n,b=d.length,c=0;c<b;c++)if(f=d[c].length,0<c)for(e=0;e<f;e++){o=e==f-1;g=d[c][o?0:e+1];h=d[c][o?f-1:e];l=d[c-1][o?f-1:e];o=
  99. d[c-1][o?0:e+1];r=c/(b-1);q=(c-1)/(b-1);i=(e+1)/f;var m=e/f,p=new THREE.UV(1-i,r),r=new THREE.UV(1-m,r),m=new THREE.UV(1-m,q),v=new THREE.UV(1-i,q);c<d.length-1&&(q=this.vertices[g].position.clone(),i=this.vertices[h].position.clone(),n=this.vertices[l].position.clone(),q.normalize(),i.normalize(),n.normalize(),this.faces.push(new THREE.Face3(g,h,l,[new THREE.Vector3(q.x,q.y,q.z),new THREE.Vector3(i.x,i.y,i.z),new THREE.Vector3(n.x,n.y,n.z)])),this.faceVertexUvs[0].push([p,r,m]));1<c&&(q=this.vertices[g].position.clone(),
  100. i=this.vertices[l].position.clone(),n=this.vertices[o].position.clone(),q.normalize(),i.normalize(),n.normalize(),this.faces.push(new THREE.Face3(g,l,o,[new THREE.Vector3(q.x,q.y,q.z),new THREE.Vector3(i.x,i.y,i.z),new THREE.Vector3(n.x,n.y,n.z)])),this.faceVertexUvs[0].push([p,m,v]))}this.computeCentroids();this.computeFaceNormals();this.computeVertexNormals();this.boundingSphere={radius:a}};THREE.Sphere.prototype=new THREE.Geometry;THREE.Sphere.prototype.constructor=THREE.Sphere;
  101. window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}());</script></div></body></html>