text: /**
   * @author qiao / https://github.com/qiao
   * @author mrdoob / http://mrdoob.com
   * @author alteredq / http://alteredqualia.com/
   * @author WestLangley / http://github.com/WestLangley
   * @author erich666 / http://erichaines.com
   */
  THREE.OrbitControls=function(e,t){function n(){return 2*Math.PI/60/60*U.autoRotateSpeed}function o(){return Math.pow(.95,U.zoomSpeed)}function a(e){F-=e}function i(e){I-=e}function r(e){U.object instanceof THREE.PerspectiveCamera?X/=e:U.object instanceof THREE.OrthographicCamera?(U.object.zoom=Math.max(U.minZoom,Math.min(U.maxZoom,U.object.zoom*e)),U.object.updateProjectionMatrix(),_=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),U.enableZoom=!1)}function s(e){U.object instanceof THREE.PerspectiveCamera?X*=e:U.object instanceof THREE.OrthographicCamera?(U.object.zoom=Math.max(U.minZoom,Math.min(U.maxZoom,U.object.zoom/e)),U.object.updateProjectionMatrix(),_=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),U.enableZoom=!1)}function c(e){B.set(e.clientX,e.clientY)}function u(e){$.set(e.clientX,e.clientY)}function m(e){W.set(e.clientX,e.clientY)}function l(e){q.set(e.clientX,e.clientY),G.subVectors(q,B);var t=U.domElement===document?U.domElement.body:U.domElement;a(2*Math.PI*G.x/t.clientWidth*U.rotateSpeed),i(2*Math.PI*G.y/t.clientHeight*U.rotateSpeed),B.copy(q),U.update()}function d(e){ee.set(e.clientX,e.clientY),te.subVectors(ee,$),te.y>0?r(o()):te.y<0&&s(o()),$.copy(ee),U.update()}function E(e){Q.set(e.clientX,e.clientY),J.subVectors(Q,W),ae(J.x,J.y),W.copy(Q),U.update()}function h(e){}function b(e){var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?s(o()):0>t&&r(o()),U.update()}function p(e){switch(e.keyCode){case U.keys.UP:ae(0,U.keyPanSpeed),U.update();break;case U.keys.BOTTOM:ae(0,-U.keyPanSpeed),U.update();break;case U.keys.LEFT:ae(U.keyPanSpeed,0),U.update();break;case U.keys.RIGHT:ae(-U.keyPanSpeed,0),U.update()}}function f(e){B.set(e.touches[0].pageX,e.touches[0].pageY)}function v(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,o=Math.sqrt(t*t+n*n);$.set(0,o)}function g(e){W.set(e.touches[0].pageX,e.touches[0].pageY)}function T(e){q.set(e.touches[0].pageX,e.touches[0].pageY),G.subVectors(q,B);var t=U.domElement===document?U.domElement.body:U.domElement;a(2*Math.PI*G.x/t.clientWidth*U.rotateSpeed),i(2*Math.PI*G.y/t.clientHeight*U.rotateSpeed),B.copy(q),U.update()}function R(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,a=Math.sqrt(t*t+n*n);ee.set(0,a),te.subVectors(ee,$),te.y>0?s(o()):te.y<0&&r(o()),$.copy(ee),U.update()}function O(e){Q.set(e.touches[0].pageX,e.touches[0].pageY),J.subVectors(Q,W),ae(J.x,J.y),W.copy(Q),U.update()}function y(e){}function H(e){if(U.enabled!==!1){if(e.preventDefault(),e.button===U.mouseButtons.ORBIT){if(U.enableRotate===!1)return;c(e),S=Z.ROTATE}else if(e.button===U.mouseButtons.ZOOM){if(U.enableZoom===!1)return;u(e),S=Z.DOLLY}else if(e.button===U.mouseButtons.PAN){if(U.enablePan===!1)return;m(e),S=Z.PAN}S!==Z.NONE&&(document.addEventListener("mousemove",w,!1),document.addEventListener("mouseup",P,!1),document.addEventListener("mouseout",P,!1),U.dispatchEvent(V))}}function w(e){if(U.enabled!==!1)if(e.preventDefault(),S===Z.ROTATE){if(U.enableRotate===!1)return;l(e)}else if(S===Z.DOLLY){if(U.enableZoom===!1)return;d(e)}else if(S===Z.PAN){if(U.enablePan===!1)return;E(e)}}function P(e){U.enabled!==!1&&(h(e),document.removeEventListener("mousemove",w,!1),document.removeEventListener("mouseup",P,!1),document.removeEventListener("mouseout",P,!1),U.dispatchEvent(z),S=Z.NONE)}function M(e){U.enabled!==!1&&U.enableZoom!==!1&&S===Z.NONE&&(e.preventDefault(),e.stopPropagation(),b(e),U.dispatchEvent(V),U.dispatchEvent(z))}function j(e){U.enabled!==!1&&U.enableKeys!==!1&&U.enablePan!==!1&&p(e)}function L(e){if(U.enabled!==!1){switch(e.touches.length){case 1:if(U.enableRotate===!1)return;f(e),S=Z.TOUCH_ROTATE;break;case 2:if(U.enableZoom===!1)return;v(e),S=Z.TOUCH_DOLLY;break;case 3:if(U.enablePan===!1)return;g(e),S=Z.TOUCH_PAN;break;default:S=Z.NONE}S!==Z.NONE&&U.dispatchEvent(V)}}function C(e){if(U.enabled!==!1)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(U.enableRotate===!1)return;if(S!==Z.TOUCH_ROTATE)return;T(e);break;case 2:if(U.enableZoom===!1)return;if(S!==Z.TOUCH_DOLLY)return;R(e);break;case 3:if(U.enablePan===!1)return;if(S!==Z.TOUCH_PAN)return;O(e);break;default:S=Z.NONE}}function N(e){U.enabled!==!1&&(y(e),U.dispatchEvent(z),S=Z.NONE)}function x(e){e.preventDefault()}this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-(1/0),this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return D},this.getAzimuthalAngle=function(){return A},this.reset=function(){U.target.copy(U.target0),U.object.position.copy(U.position0),U.object.zoom=U.zoom0,U.object.updateProjectionMatrix(),U.dispatchEvent(k),U.update(),S=Z.NONE},this.update=function(){var t=new THREE.Vector3,o=(new THREE.Quaternion).setFromUnitVectors(e.up,new THREE.Vector3(0,1,0)),i=o.clone().inverse(),r=new THREE.Vector3,s=new THREE.Quaternion;return function(){var e=U.object.position;t.copy(e).sub(U.target),t.applyQuaternion(o),A=Math.atan2(t.x,t.z),D=Math.atan2(Math.sqrt(t.x*t.x+t.z*t.z),t.y),U.autoRotate&&S===Z.NONE&&a(n()),A+=F,D+=I,A=Math.max(U.minAzimuthAngle,Math.min(U.maxAzimuthAngle,A)),D=Math.max(U.minPolarAngle,Math.min(U.maxPolarAngle,D)),D=Math.max(Y,Math.min(Math.PI-Y,D));var c=t.length()*X;return c=Math.max(U.minDistance,Math.min(U.maxDistance,c)),U.target.add(K),t.x=c*Math.sin(D)*Math.sin(A),t.y=c*Math.cos(D),t.z=c*Math.sin(D)*Math.cos(A),t.applyQuaternion(i),e.copy(U.target).add(t),U.object.lookAt(U.target),U.enableDamping===!0?(F*=1-U.dampingFactor,I*=1-U.dampingFactor):(F=0,I=0),X=1,K.set(0,0,0),_||r.distanceToSquared(U.object.position)>Y||8*(1-s.dot(U.object.quaternion))>Y?(U.dispatchEvent(k),r.copy(U.object.position),s.copy(U.object.quaternion),_=!1,!0):!1}}(),this.dispose=function(){U.domElement.removeEventListener("contextmenu",x,!1),U.domElement.removeEventListener("mousedown",H,!1),U.domElement.removeEventListener("mousewheel",M,!1),U.domElement.removeEventListener("MozMousePixelScroll",M,!1),U.domElement.removeEventListener("touchstart",L,!1),U.domElement.removeEventListener("touchend",N,!1),U.domElement.removeEventListener("touchmove",C,!1),document.removeEventListener("mousemove",w,!1),document.removeEventListener("mouseup",P,!1),document.removeEventListener("mouseout",P,!1),window.removeEventListener("keydown",j,!1)};var A,D,U=this,k={type:"change"},V={type:"start"},z={type:"end"},Z={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},S=Z.NONE,Y=1e-6,I=0,F=0,X=1,K=new THREE.Vector3,_=!1,B=new THREE.Vector2,q=new THREE.Vector2,G=new THREE.Vector2,W=new THREE.Vector2,Q=new THREE.Vector2,J=new THREE.Vector2,$=new THREE.Vector2,ee=new THREE.Vector2,te=new THREE.Vector2,ne=function(){var e=new THREE.Vector3;return function(t,n){var o=n.elements;e.set(o[0],o[1],o[2]),e.multiplyScalar(-t),K.add(e)}}(),oe=function(){var e=new THREE.Vector3;return function(t,n){var o=n.elements;e.set(o[4],o[5],o[6]),e.multiplyScalar(t),K.add(e)}}(),ae=function(){var e=new THREE.Vector3;return function(t,n){var o=U.domElement===document?U.domElement.body:U.domElement;if(U.object instanceof THREE.PerspectiveCamera){var a=U.object.position;e.copy(a).sub(U.target);var i=e.length();i*=Math.tan(U.object.fov/2*Math.PI/180),ne(2*t*i/o.clientHeight,U.object.matrix),oe(2*n*i/o.clientHeight,U.object.matrix)}else U.object instanceof THREE.OrthographicCamera?(ne(t*(U.object.right-U.object.left)/o.clientWidth,U.object.matrix),oe(n*(U.object.top-U.object.bottom)/o.clientHeight,U.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),U.enablePan=!1)}}();U.domElement.addEventListener("contextmenu",x,!1),U.domElement.addEventListener("mousedown",H,!1),U.domElement.addEventListener("mousewheel",M,!1),U.domElement.addEventListener("MozMousePixelScroll",M,!1),U.domElement.addEventListener("touchstart",L,!1),U.domElement.addEventListener("touchend",N,!1),U.domElement.addEventListener("touchmove",C,!1),window.addEventListener("keydown",j,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.constraint.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.constraint.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.constraint.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.constraint.dampingFactor=e}}});
  