@cognite/3d-camera-controls
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.cognite=e():t.cognite=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i(i.s=23)}([function(t,e,i){t.exports=!i(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){var n=i(13),s=i(12),r=i(10),o=Object.defineProperty;e.f=i(0)?Object.defineProperty:function(t,e,i){if(n(t),e=r(e,!0),n(i),s)try{return o(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e){var i=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=i)},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){t.exports={US:{8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause/break",20:"capslock",27:"escape",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",91:"leftwindow",92:"rightwindow",93:"select",96:"numpad-0",97:"numpad-1",98:"numpad-2",99:"numpad-3",100:"numpad-4",101:"numpad-5",102:"numpad-6",103:"numpad-7",104:"numpad-8",105:"numpad-9",106:"multiply",107:"add",109:"subtract",110:"decimalpoint",111:"divide",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:"semicolon",187:"equals",188:"comma",189:"dash",190:"period",191:"forwardslash",192:"graveaccent",219:"openbracket",220:"backslash",221:"closebraket",222:"singlequote"}}},function(t,e,i){"use strict";function n(t){this.keys={};var e=this;for(var i in t)t.hasOwnProperty(i)&&(this.keys[t[i]]=0);window.addEventListener("keydown",function(i){if(t.hasOwnProperty(i.keyCode))return 0===e.keys[t[i.keyCode]]&&(e.keys[t[i.keyCode]]=2),!1}),window.addEventListener("keyup",function(i){if(t.hasOwnProperty(i.keyCode))return e.keys[t[i.keyCode]]=0,!1})}n.prototype.isPressed=function(t){return this.keys[t]>=1},n.prototype.consumePressed=function(t){var e=2===this.keys[t];return e&&(this.keys[t]=1),e},t.exports=n},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){var n=i(1);t.exports=function(t,e){if(!n(t))return t;var i,s;if(e&&"function"==typeof(i=t.toString)&&!n(s=i.call(t)))return s;if("function"==typeof(i=t.valueOf)&&!n(s=i.call(t)))return s;if(!e&&"function"==typeof(i=t.toString)&&!n(s=i.call(t)))return s;throw TypeError("Can't convert object to primitive value")}},function(t,e,i){var n=i(1),s=i(5).document,r=n(s)&&n(s.createElement);t.exports=function(t){return r?s.createElement(t):{}}},function(t,e,i){t.exports=!i(0)&&!i(2)(function(){return 7!=Object.defineProperty(i(11)("div"),"a",{get:function(){return 7}}).a})},function(t,e,i){var n=i(1);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,i){var n=i(3),s=i(9);t.exports=i(0)?function(t,e,i){return n.f(t,e,s(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){var n=i(15);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,s){return t.call(e,i,n,s)}}return function(){return t.apply(e,arguments)}}},function(t,e,i){var n=i(5),s=i(4),r=i(16),o=i(14),a=i(8),h=function(t,e,i){var c,u,d,l=t&h.F,p=t&h.G,f=t&h.S,m=t&h.P,g=t&h.B,v=t&h.W,y=p?s:s[e]||(s[e]={}),E=y.prototype,b=p?n:f?n[e]:(n[e]||{}).prototype;for(c in p&&(i=e),i)(u=!l&&b&&void 0!==b[c])&&a(y,c)||(d=u?b[c]:i[c],y[c]=p&&"function"!=typeof b[c]?i[c]:g&&u?r(d,n):v&&b[c]==d?function(t){var e=function(e,i,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,i)}return new t(e,i,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(d):m&&"function"==typeof d?r(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[c]=d,t&h.R&&E&&!E[c]&&o(E,c,d)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,t.exports=h},function(t,e,i){var n=i(17);n(n.S+n.F*!i(0),"Object",{defineProperty:i(3).f})},function(t,e,i){i(18);var n=i(4).Object;t.exports=function(t,e,i){return n.defineProperty(t,e,i)}},function(t,e,i){t.exports={default:i(19),__esModule:!0}},function(t,e,i){"use strict";e.__esModule=!0;var n,s=i(20),r=(n=s)&&n.__esModule?n:{default:n};e.default=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,r.default)(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}()},function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CameraControls=void 0;var n=r(i(22)),s=r(i(21));function r(t){return t&&t.__esModule?t:{default:t}}var o=i(7),a=i(6).US,h=void 0,c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5,ROTATE_FP:6,FP_NAVIGATE:7},u=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");e.CameraControls=function(){function t(e,i){var s=this;(0,n.default)(this,t),this.object=e,this.domElement=i,this.enabled=!0,this.minDistance=0,this.maxDistance=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.dampingFactor=.5,this.draggingDampingFactor=.1,this.minZoomDistance=.3,this.maxZoomDistance=1,this.panSpeed=30,this.minPanDistance=1,this.rotationSpeed=.005,this.enableKeyboardNavigation=!0,this.minDistToTarget=2,this.target=new h.Vector3,this.targetEnd=new h.Vector3,this.spherical=new h.Spherical,this.spherical.setFromVector3(this.object.position),this.sphericalEnd=(new h.Spherical).copy(this.spherical),this.state=c.NONE,this.keyboard=new o(a),this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.wasdKeys=["w","a","s","d"],this.mouse=new h.Vector2,this.plane=new h.Plane,this.line3=new h.Line3,this.v3=new h.Vector3,this.raycaster=new h.Raycaster,this.xColumn=new h.Vector3,this.yColumn=new h.Vector3,this.dragStart=new h.Vector2,this.dollyStart=new h.Vector2,this.onMouseDown=this.onMouseDown.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.dragging=this.dragging.bind(this),this.startDragging=this.startDragging.bind(this),this.endDragging=this.endDragging.bind(this),this.needsUpdate=!0,this.update(),this.domElement?(this.domElement.addEventListener("mousedown",this.onMouseDown),this.domElement.addEventListener("touchstart",this.onTouchStart),this.domElement.addEventListener("wheel",this.onMouseWheel),this.domElement.addEventListener("DOMMouseScroll",this.onMouseWheel),this.domElement.addEventListener("contextmenu",this.onContextMenu),this.dispose=function(){s.domElement.removeEventListener("mousedown",s.onMouseDown),s.domElement.removeEventListener("touchstart",s.onTouchStart),s.domElement.removeEventListener("wheel",s.onMouseWheel),s.domElement.removeEventListener("DOMMouseScroll",s.onMouseWheel),s.domElement.removeEventListener("contextmenu",s.onContextMenu),document.removeEventListener("mousemove",s.dragging),document.removeEventListener("touchmove",s.dragging),document.removeEventListener("mouseup",s.endDragging),document.removeEventListener("touchend",s.endDragging)}):this.dispose=function(){}}return(0,s.default)(t,null,[{key:"install",value:function(t){h=t}}]),(0,s.default)(t,[{key:"onMouseDown",value:function(t){var e=this;if(this.enabled){t.preventDefault();var i=this.state;switch(this.elementRect=this.domElement.getBoundingClientRect(),t.button){case h.MOUSE.LEFT:var n=this.keyboard.isPressed("shift");if(this.state=n?c.ROTATE_FP:c.ROTATE,this.state===c.ROTATE)this.wasdKeys.filter(function(t){return e.keyboard.isPressed(t)}).length>0&&(this.state=c.ROTATE_FP);break;case h.MOUSE.MIDDLE:this.state=c.DOLLY;break;case h.MOUSE.RIGHT:this.state=c.PAN}i===c.NONE&&this.startDragging(t)}}},{key:"onTouchStart",value:function(t){if(this.enabled){t.preventDefault(),this.elementRect=this.domElement.getBoundingClientRect();var e=this.state;switch(t.touches.length){case 1:this.state=c.TOUCH_ROTATE;break;case 2:this.state=c.TOUCH_DOLLY;break;case 3:this.state=c.TOUCH_PAN}e===c.NONE&&this.startDragging(t)}}},{key:"onMouseWheel",value:function(t){if(this.enabled){t.preventDefault();var e=t.offsetX/this.domElement.clientWidth*2-1,i=-t.offsetY/this.domElement.clientHeight*2+1,n=0;if(t.wheelDelta)n=-t.wheelDelta/40;else if(t.detail)n=t.detail;else if(t.deltaY){var s=u?1:40;n=t.deltaY/s}n<0?this.dollyIn(e,i,Math.abs(n)):this.dollyOut(e,i,Math.abs(n))}}},{key:"checkKeyboardEvents",value:function(){var t=this;if(this.enabled&&this.enableKeyboardNavigation){var e=this.keyboard,i=e.isPressed("shift"),n=i?2:.6,s=function(e,i){var s=t.getZoomDistance(!0,n);t.pan(e*s,i*s,!0)},r=!1,o=function(){r=!0};e.isPressed("w")&&(o(),this.dollyIn(0,0,n)),e.isPressed("s")&&(o(),this.dollyOut(0,0,n)),e.isPressed("a")&&(o(),s(1,0)),e.isPressed("d")&&(o(),s(-1,0));var a=i?10:5;e.isPressed("left")&&(o(),this.rotatetFP(a,0)),e.isPressed("up")&&(o(),this.rotatetFP(0,.5*a)),e.isPressed("down")&&(o(),this.rotatetFP(0,.5*-a)),e.isPressed("right")&&(o(),this.rotatetFP(-a,0)),r&&(this.needsUpdate=!0)}}},{key:"onContextMenu",value:function(t){this.enabled&&t.preventDefault()}},{key:"startDragging",value:function(t){if(this.enabled){t.preventDefault();var e=t.touches?t.touches[0]:t,i=e.clientX,n=e.clientY;if(this.dragStart.set(i,n),this.state===c.TOUCH_DOLLY){var s=i-t.touches[1].pageX,r=n-t.touches[1].pageY,o=Math.sqrt(s*s+r*r);this.dollyStart.set(0,o)}this.dampingFactor=this.draggingDampingFactor,document.addEventListener("mousemove",this.dragging,{passive:!1}),document.addEventListener("touchmove",this.dragging,{passive:!1}),document.addEventListener("mouseup",this.endDragging),document.addEventListener("touchend",this.endDragging)}}},{key:"dragging",value:function(t){if(this.enabled){t.preventDefault();var e=t.touches?t.touches[0]:t,i=e.clientX,n=e.clientY,s=this.dragStart.x-i,r=this.dragStart.y-n;switch(this.dragStart.set(i,n),this.state){case c.ROTATE:case c.TOUCH_ROTATE:var o=2*Math.PI*s/this.elementRect.width,a=2*Math.PI*r/this.elementRect.height;this.rotate(o,a,!0);break;case c.DOLLY:break;case c.TOUCH_DOLLY:var h=i-t.touches[1].pageX,u=n-t.touches[1].pageY,d=Math.sqrt(h*h+u*u),l=this.dollyStart.y-d,p=(i+t.touches[1].pageX)/2,f=(n+t.touches[1].pageY)/2,m=p/this.domElement.clientWidth*2-1,g=-f/this.domElement.clientHeight*2+1;l>0?this.dollyOut(m,g):l<0&&this.dollyIn(m,g),this.dollyStart.set(0,d);break;case c.PAN:case c.TOUCH_PAN:var v=this.getZoomDistance(!0,1),y=-v*this.panSpeed*(s/this.elementRect.height),E=-v*this.panSpeed*(r/this.elementRect.height);this.pan(y,E,!0);break;case c.ROTATE_FP:this.rotatetFP(s,r)}}}},{key:"endDragging",value:function(){this.enabled&&(this.dampingFactor=this.dampingFactor,this.state=c.NONE,document.removeEventListener("mousemove",this.dragging),document.removeEventListener("touchmove",this.dragging),document.removeEventListener("mouseup",this.endDragging),document.removeEventListener("touchend",this.endDragging))}},{key:"dollyIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.dolly(this.getZoomDistance(!0,i),!0,t,e)}},{key:"dollyOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.dolly(this.getZoomDistance(!1,i),!0,t,e)}},{key:"rotate",value:function(t,e,i){this.rotateTo(this.sphericalEnd.theta+t,this.sphericalEnd.phi+e,i)}},{key:"rotateTo",value:function(t,e,i){var n=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,t)),s=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,e));this.sphericalEnd.theta=n,this.sphericalEnd.phi=s,this.sphericalEnd.radius=this.spherical.radius,this.sphericalEnd.makeSafe(),this.targetEnd.copy(this.target),i||(this.spherical.theta=this.sphericalEnd.theta,this.spherical.phi=this.sphericalEnd.phi),this.needsUpdate=!0}},{key:"rotatetFP",value:function(t,e){var i=this.object.clone();i.position.setFromSpherical(this.sphericalEnd).add(this.targetEnd),i.lookAt(this.targetEnd),i.rotateY(t*this.rotationSpeed),i.rotateX(e*this.rotationSpeed);var n=new h.Vector3;i.getWorldDirection(n),this.v3.subVectors(this.targetEnd,i.position);var s=this.targetEnd.distanceTo(i.position);this.targetEnd.addVectors(i.position,n.multiplyScalar(s)),this.sphericalEnd.setFromVector3(this.v3.subVectors(i.position,this.targetEnd)),function(t,e){for(var i=2*Math.PI,n=.5*i;Math.abs(t.theta-e.theta)>n;)t.theta+=t.theta<e.theta?i:-i}(this.sphericalEnd,this.spherical),this.needsUpdate=!0}},{key:"getZoomDistance",value:function(t,e){var i=this.sphericalEnd.radius,n=void 0,s=this.minDistToTarget,r=100*s;if(i<=this.minDistToTarget)n=this.minZoomDistance;else if(i>=r)n=this.maxZoomDistance;else{var o=(this.maxZoomDistance-this.minZoomDistance)/(r-s);n=this.minZoomDistance+o*(i-s)}return t&&(n=-n),n*=e}},{key:"dolly",value:function(t,e,i,n){this.dollyTo(this.sphericalEnd.radius+t,e,i,n)}},{key:"dollyTo",value:function(t,e,i,n){var s=h.Math.clamp(t,this.minDistance,this.maxDistance),r=this.sphericalEnd.radius-s;this.mouse.set(i,n);var o=this.object.clone();o.position.setFromSpherical(this.sphericalEnd).add(this.targetEnd),o.lookAt(this.targetEnd),this.raycaster.setFromCamera(this.mouse,o);var a=new h.Vector3;o.getWorldDirection(a);var c=this.plane;c.setFromNormalAndCoplanarPoint(a,this.targetEnd);var u=this.raycaster.ray.direction.clone().multiplyScalar(r);o.position.add(u);var d=this.line3,l=-c.distanceToPoint(o.position);d.set(o.position,o.position.clone().add(a.clone().multiplyScalar(2*l))),c.intersectLine(d,this.targetEnd),this.sphericalEnd.radius=this.targetEnd.distanceTo(o.position);var p=this.minDistToTarget-this.sphericalEnd.radius;if(p>0){var f=new h.Vector3;o.getWorldDirection(f),this.targetEnd.add(f.multiplyScalar(p)),this.sphericalEnd.radius=this.minDistToTarget}e||(this.spherical.radius=this.sphericalEnd.radius,this.update()),this.needsUpdate=!0}},{key:"pan",value:function(t,e,i){var n=this.object.clone();n.position.setFromSpherical(this.sphericalEnd).add(this.targetEnd),n.lookAt(this.targetEnd),n.updateMatrix(),this.xColumn.setFromMatrixColumn(n.matrix,0),this.yColumn.setFromMatrixColumn(n.matrix,1),this.xColumn.multiplyScalar(t),this.yColumn.multiplyScalar(-e);var s=this.v3.copy(this.xColumn).add(this.yColumn);this.targetEnd.add(s),i||this.target.copy(this.targetEnd),this.needsUpdate=!0}},{key:"moveTo",value:function(t,e,i,n){this.targetEnd.set(t,e,i),n||this.target.copy(this.targetEnd),this.needsUpdate=!0}},{key:"getState",value:function(){return this.state}},{key:"reset",value:function(t){this.targetEnd.copy(this.target0),this.sphericalEnd.setFromVector3(this.position0),this.sphericalEnd.theta=this.sphericalEnd.theta%(2*Math.PI),this.spherical.theta=this.spherical.theta%(2*Math.PI),t||(this.target.copy(this.targetEnd),this.spherical.copy(this.sphericalEnd)),this.needsUpdate=!0}},{key:"getCameraPosition",value:function(){var t=this.target.clone(),e=new h.Vector3;return e.setFromSpherical(this.spherical).add(t),{position:e,target:t}}},{key:"setCameraPosition",value:function(t,e){this.target0.copy(e),this.position0.copy(t.clone().sub(e)),this.reset()}},{key:"update",value:function(t){var e=1;null!=t&&(e=this.dampingFactor*t/.016),e=h.Math.clamp(e,0,1);var i=this.sphericalEnd.theta-this.spherical.theta,n=this.sphericalEnd.phi-this.spherical.phi,s=this.sphericalEnd.radius-this.spherical.radius,r=(new h.Vector3).subVectors(this.targetEnd,this.target);Math.abs(i)>.001||Math.abs(n)>.001||Math.abs(s)>.001||Math.abs(r.x)>.001||Math.abs(r.y)>.001||Math.abs(r.z)>.001?(this.spherical.set(this.spherical.radius+s*e,this.spherical.phi+n*e,this.spherical.theta+i*e),this.target.add(r.multiplyScalar(e)),this.needsUpdate=!0):(this.spherical.copy(this.sphericalEnd),this.target.copy(this.targetEnd)),this.spherical.makeSafe(),this.object.position.setFromSpherical(this.spherical).add(this.target),this.object.lookAt(this.target),this.checkKeyboardEvents();var o=this.needsUpdate;return this.needsUpdate=!1,o}}]),t}()}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.cognite=e():t.cognite=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=43)}([function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(23),s=n(7);t.exports=function(t){return i(s(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(35),s=n(34),r=n(32),o=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),s)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(4),s=n(0),r=n(38),o=n(36),a=n(8),h=function(t,e,n){var c,u,l,d=t&h.F,p=t&h.G,f=t&h.S,m=t&h.P,g=t&h.B,v=t&h.W,y=p?s:s[e]||(s[e]={}),E=y.prototype,b=p?i:f?i[e]:(i[e]||{}).prototype;for(c in p&&(n=e),n)(u=!d&&b&&void 0!==b[c])&&a(y,c)||(l=u?b[c]:n[c],y[c]=p&&"function"!=typeof b[c]?n[c]:g&&u?r(l,i):v&&b[c]==l?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):m&&"function"==typeof l?r(Function.call,l):l,m&&((y.virtual||(y.virtual={}))[c]=l,t&h.R&&E&&!E[c]&&o(E,c,l)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,t.exports=h},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.KeyMapUS={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause/break",20:"capslock",27:"escape",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",91:"leftwindow",92:"rightwindow",93:"select",96:"numpad-0",97:"numpad-1",98:"numpad-2",99:"numpad-3",100:"numpad-4",101:"numpad-5",102:"numpad-6",103:"numpad-7",104:"numpad-8",105:"numpad-9",106:"multiply",107:"add",109:"subtract",110:"decimalpoint",111:"divide",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scrolllock",186:"semicolon",187:"equals",188:"comma",189:"dash",190:"period",191:"forwardslash",192:"graveaccent",219:"openbracket",220:"backslash",221:"closebraket",222:"singlequote"}},function(t,e,n){var i=n(10),s=n(0),r=n(2);t.exports=function(t,e){var n=(s.Object||{})[t]||Object[t],o={};o[t]=e(n),i(i.S+i.F*r(function(){n(1)}),"Object",o)}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=!0},function(t,e,n){var i=n(0),s=n(4),r=s["__core-js_shared__"]||(s["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(16)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var i=n(17)("keys"),s=n(15);t.exports=function(t){return i[t]||(i[t]=s(t))}},function(t,e,n){var i=n(5),s=Math.max,r=Math.min;t.exports=function(t,e){return(t=i(t))<0?s(t+e,0):r(t,e)}},function(t,e,n){var i=n(5),s=Math.min;t.exports=function(t){return t>0?s(i(t),9007199254740991):0}},function(t,e,n){var i=n(6),s=n(20),r=n(19);t.exports=function(t){return function(e,n,o){var a,h=i(e),c=s(h.length),u=r(o,c);if(t&&n!=n){for(;c>u;)if((a=h[u++])!=a)return!0}else for(;c>u;u++)if((t||u in h)&&h[u]===n)return t||u||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(8),s=n(6),r=n(21)(!1),o=n(18)("IE_PROTO");t.exports=function(t,e){var n,a=s(t),h=0,c=[];for(n in a)n!=o&&i(a,n)&&c.push(n);for(;e.length>h;)i(a,n=e[h++])&&(~r(c,n)||c.push(n));return c}},function(t,e,n){var i=n(24),s=n(14);t.exports=Object.keys||function(t){return i(t,s)}},function(t,e,n){var i=n(7);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(26),s=n(25);n(13)("keys",function(){return function(t){return s(i(t))}})},function(t,e,n){n(27),t.exports=n(0).Object.keys},function(t,e,n){t.exports={default:n(28),__esModule:!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(29)),s=r(n(11));function r(t){return t&&t.__esModule?t:{default:t}}e.default=function t(e){var n=this;(0,s.default)(this,t),this.isPressed=function(t){return n.keys[t]>=1},this.comsumePressed=function(t){var e=2===n.keys[t];return e&&(n.keys[t]=1),e},this.keys={},(0,i.default)(e).forEach(function(t){n.keys[e[t]]=0}),window.addEventListener("keydown",function(t){t.keyCode in e&&0===n.keys[e[t.keyCode]]&&(n.keys[e[t.keyCode]]=2)}),window.addEventListener("keyup",function(t){t.keyCode in e&&(n.keys[e[t.keyCode]]=0)}),window.addEventListener("blur",function(){(0,i.default)(n.keys).forEach(function(t){n.keys[t]=0})})}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(3);t.exports=function(t,e){if(!i(t))return t;var n,s;if(e&&"function"==typeof(n=t.toString)&&!i(s=n.call(t)))return s;if("function"==typeof(n=t.valueOf)&&!i(s=n.call(t)))return s;if(!e&&"function"==typeof(n=t.toString)&&!i(s=n.call(t)))return s;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(3),s=n(4).document,r=i(s)&&i(s.createElement);t.exports=function(t){return r?s.createElement(t):{}}},function(t,e,n){t.exports=!n(1)&&!n(2)(function(){return 7!=Object.defineProperty(n(33)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(3);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(9),s=n(31);t.exports=n(1)?function(t,e,n){return i.f(t,e,s(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(37);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,s){return t.call(e,n,i,s)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(10);i(i.S+i.F*!n(1),"Object",{defineProperty:n(9).f})},function(t,e,n){n(39);var i=n(0).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){t.exports={default:n(40),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var i,s=n(41),r=(i=s)&&i.__esModule?i:{default:i};e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CameraControls=void 0;var i=a(n(11)),s=a(n(42)),r=a(n(30)),o=n(12);function a(t){return t&&t.__esModule?t:{default:t}}var h=void 0,c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5,ROTATE_FP:6,FP_NAVIGATE:7},u=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");e.CameraControls=function(){function t(e,n){var s=this;(0,i.default)(this,t),this.object=e,this.domElement=n,this.enabled=!0,this.minDistance=0,this.maxDistance=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.dampingFactor=.5,this.draggingDampingFactor=.1,this.minZoomDistance=.3,this.maxZoomDistance=1,this.panSpeed=30,this.minPanDistance=1,this.rotationSpeed=.005,this.enableKeyboardNavigation=!0,this.minDistToTarget=2,this.target=new h.Vector3,this.targetEnd=new h.Vector3,this.spherical=new h.Spherical,this.spherical.setFromVector3(this.object.position),this.sphericalEnd=(new h.Spherical).copy(this.spherical),this.state=c.NONE,this.keyboard=new r.default(o.KeyMapUS),this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.wasdKeys=["w","a","s","d"],this.mouse=new h.Vector2,this.plane=new h.Plane,this.line3=new h.Line3,this.v3=new h.Vector3,this.raycaster=new h.Raycaster,this.xColumn=new h.Vector3,this.yColumn=new h.Vector3,this.dragStart=new h.Vector2,this.dollyStart=new h.Vector2,this.onMouseDown=this.onMouseDown.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.dragging=this.dragging.bind(this),this.startDragging=this.startDragging.bind(this),this.endDragging=this.endDragging.bind(this),this.needsUpdate=!0,this.update(),this.domElement?(this.domElement.addEventListener("mousedown",this.onMouseDown),this.domElement.addEventListener("touchstart",this.onTouchStart),this.domElement.addEventListener("wheel",this.onMouseWheel),this.domElement.addEventListener("DOMMouseScroll",this.onMouseWheel),this.domElement.addEventListener("contextmenu",this.onContextMenu),this.dispose=function(){s.domElement.removeEventListener("mousedown",s.onMouseDown),s.domElement.removeEventListener("touchstart",s.onTouchStart),s.domElement.removeEventListener("wheel",s.onMouseWheel),s.domElement.removeEventListener("DOMMouseScroll",s.onMouseWheel),s.domElement.removeEventListener("contextmenu",s.onContextMenu),document.removeEventListener("mousemove",s.dragging),document.removeEventListener("touchmove",s.dragging),document.removeEventListener("mouseup",s.endDragging),document.removeEventListener("touchend",s.endDragging)}):this.dispose=function(){}}return(0,s.default)(t,null,[{key:"install",value:function(t){h=t}}]),(0,s.default)(t,[{key:"onMouseDown",value:function(t){var e=this;if(this.enabled){t.preventDefault();var n=this.state;switch(this.elementRect=this.domElement.getBoundingClientRect(),t.button){case h.MOUSE.LEFT:var i=this.keyboard.isPressed("shift");if(this.state=i?c.ROTATE_FP:c.ROTATE,this.state===c.ROTATE)this.wasdKeys.filter(function(t){return e.keyboard.isPressed(t)}).length>0&&(this.state=c.ROTATE_FP);break;case h.MOUSE.MIDDLE:this.state=c.DOLLY;break;case h.MOUSE.RIGHT:this.state=c.PAN}n===c.NONE&&this.startDragging(t)}}},{key:"onTouchStart",value:function(t){if(this.enabled){t.preventDefault(),this.elementRect=this.domElement.getBoundingClientRect();var e=this.state;switch(t.touches.length){case 1:this.state=c.TOUCH_ROTATE;break;case 2:this.state=c.TOUCH_DOLLY;break;case 3:this.state=c.TOUCH_PAN}e===c.NONE&&this.startDragging(t)}}},{key:"onMouseWheel",value:function(t){if(this.enabled){t.preventDefault();var e=t.offsetX/this.domElement.clientWidth*2-1,n=-t.offsetY/this.domElement.clientHeight*2+1,i=0;if(t.wheelDelta)i=-t.wheelDelta/40;else if(t.detail)i=t.detail;else if(t.deltaY){var s=u?1:40;i=t.deltaY/s}i<0?this.dollyIn(e,n,Math.abs(i)):this.dollyOut(e,n,Math.abs(i))}}},{key:"checkKeyboardEvents",value:function(){var t=this;if(this.enabled&&this.enableKeyboardNavigation){var e=this.keyboard,n=e.isPressed("shift"),i=n?2:.6,s=function(e,n){var s=t.getZoomDistance(!0,i);t.pan(e*s,n*s,!0)},r=!1,o=function(){r=!0};e.isPressed("w")&&(o(),this.dollyIn(0,0,i)),e.isPressed("s")&&(o(),this.dollyOut(0,0,i)),e.isPressed("a")&&(o(),s(1,0)),e.isPressed("d")&&(o(),s(-1,0));var a=n?10:5;e.isPressed("left")&&(o(),this.rotatetFP(a,0)),e.isPressed("up")&&(o(),this.rotatetFP(0,.5*a)),e.isPressed("down")&&(o(),this.rotatetFP(0,.5*-a)),e.isPressed("right")&&(o(),this.rotatetFP(-a,0)),r&&(this.needsUpdate=!0)}}},{key:"onContextMenu",value:function(t){this.enabled&&t.preventDefault()}},{key:"startDragging",value:function(t){if(this.enabled){t.preventDefault();var e=t.touches?t.touches[0]:t,n=e.clientX,i=e.clientY;if(this.dragStart.set(n,i),this.state===c.TOUCH_DOLLY){var s=n-t.touches[1].pageX,r=i-t.touches[1].pageY,o=Math.sqrt(s*s+r*r);this.dollyStart.set(0,o)}this.dampingFactor=this.draggingDampingFactor,document.addEventListener("mousemove",this.dragging,{passive:!1}),document.addEventListener("touchmove",this.dragging,{passive:!1}),document.addEventListener("mouseup",this.endDragging),document.addEventListener("touchend",this.endDragging)}}},{key:"dragging",value:function(t){if(this.enabled){t.preventDefault();var e=t.touches?t.touches[0]:t,n=e.clientX,i=e.clientY,s=this.dragStart.x-n,r=this.dragStart.y-i;switch(this.dragStart.set(n,i),this.state){case c.ROTATE:case c.TOUCH_ROTATE:var o=2*Math.PI*s/this.elementRect.width,a=2*Math.PI*r/this.elementRect.height;this.rotate(o,a,!0);break;case c.DOLLY:break;case c.TOUCH_DOLLY:var h=n-t.touches[1].pageX,u=i-t.touches[1].pageY,l=Math.sqrt(h*h+u*u),d=this.dollyStart.y-l,p=(n+t.touches[1].pageX)/2,f=(i+t.touches[1].pageY)/2,m=p/this.domElement.clientWidth*2-1,g=-f/this.domElement.clientHeight*2+1;d>0?this.dollyOut(m,g):d<0&&this.dollyIn(m,g),this.dollyStart.set(0,l);break;case c.PAN:case c.TOUCH_PAN:var v=this.getZoomDistance(!0,1),y=-v*this.panSpeed*(s/this.elementRect.height),E=-v*this.panSpeed*(r/this.elementRect.height);this.pan(y,E,!0);break;case c.ROTATE_FP:this.rotatetFP(s,r)}}}},{key:"endDragging",value:function(){this.enabled&&(this.dampingFactor=this.dampingFactor,this.state=c.NONE,document.removeEventListener("mousemove",this.dragging),document.removeEventListener("touchmove",this.dragging),document.removeEventListener("mouseup",this.endDragging),document.removeEventListener("touchend",this.endDragging))}},{key:"dollyIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.dolly(this.getZoomDistance(!0,n),!0,t,e)}},{key:"dollyOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.dolly(this.getZoomDistance(!1,n),!0,t,e)}},{key:"rotate",value:function(t,e,n){this.rotateTo(this.sphericalEnd.theta+t,this.sphericalEnd.phi+e,n)}},{key:"rotateTo",value:function(t,e,n){var i=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,t)),s=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,e));this.sphericalEnd.theta=i,this.sphericalEnd.phi=s,this.sphericalEnd.radius=this.spherical.radius,this.sphericalEnd.makeSafe(),this.targetEnd.copy(this.target),n||(this.spherical.theta=this.sphericalEnd.theta,this.spherical.phi=this.sphericalEnd.phi),this.needsUpdate=!0}},{key:"rotatetFP",value:function(t,e){var n=this.object.clone();n.position.setFromSpherical(this.sphericalEnd).add(this.targetEnd),n.lookAt(this.targetEnd),n.rotateY(t*this.rotationSpeed),n.rotateX(e*this.rotationSpeed);var i=new h.Vector3;n.getWorldDirection(i),this.v3.subVectors(this.targetEnd,n.position);var s=this.targetEnd.distanceTo(n.position);this.targetEnd.addVectors(n.position,i.multiplyScalar(s)),this.sphericalEnd.setFromVector3(this.v3.subVectors(n.position,this.targetEnd)),function(t,e){for(var n=2*Math.PI,i=.5*n;Math.abs(t.theta-e.theta)>i;)t.theta+=t.theta<e.theta?n:-n}(this.sphericalEnd,this.spherical),this.needsUpdate=!0}},{key:"getZoomDistance",value:function(t,e){var n=this.sphericalEnd.radius,i=void 0,s=this.minDistToTarget,r=100*s;if(n<=this.minDistToTarget)i=this.minZoomDistance;else if(n>=r)i=this.maxZoomDistance;else{var o=(this.maxZoomDistance-this.minZoomDistance)/(r-s);i=this.minZoomDistance+o*(n-s)}return t&&(i=-i),i*=e}},{key:"dolly",value:function(t,e,n,i){this.dollyTo(this.sphericalEnd.radius+t,e,n,i)}},{key:"dollyTo",value:function(t,e,n,i){var s=h.Math.clamp(t,this.minDistance,this.maxDistance),r=this.sphericalEnd.radius-s;this.mouse.set(n,i);var o=this.object.clone();o.position.setFromSpherical(this.sphericalEnd).add(this.targetEnd),o.lookAt(this.targetEnd),this.raycaster.setFromCamera(this.mouse,o);var a=new h.Vector3;o.getWorldDirection(a);var c=this.plane;c.setFromNormalAndCoplanarPoint(a,this.targetEnd);var u=this.raycaster.ray.direction.clone().multiplyScalar(r);o.position.add(u);var l=this.line3,d=-c.distanceToPoint(o.position);l.set(o.position,o.position.clone().add(a.clone().multiplyScalar(2*d))),c.intersectLine(l,this.targetEnd),this.sphericalEnd.radius=this.targetEnd.distanceTo(o.position);var p=this.minDistToTarget-this.sphericalEnd.radius;if(p>0){var f=new h.Vector3;o.getWorldDirection(f),this.targetEnd.add(f.multiplyScalar(p)),this.sphericalEnd.radius=this.minDistToTarget}e||(this.spherical.radius=this.sphericalEnd.radius,this.update()),this.needsUpdate=!0}},{key:"pan",value:function(t,e,n){var i=this.object.clone();i.position.setFromSpherical(this.sphericalEnd).add(this.targetEnd),i.lookAt(this.targetEnd),i.updateMatrix(),this.xColumn.setFromMatrixColumn(i.matrix,0),this.yColumn.setFromMatrixColumn(i.matrix,1),this.xColumn.multiplyScalar(t),this.yColumn.multiplyScalar(-e);var s=this.v3.copy(this.xColumn).add(this.yColumn);this.targetEnd.add(s),n||this.target.copy(this.targetEnd),this.needsUpdate=!0}},{key:"moveTo",value:function(t,e,n,i){this.targetEnd.set(t,e,n),i||this.target.copy(this.targetEnd),this.needsUpdate=!0}},{key:"getState",value:function(){return this.state}},{key:"reset",value:function(t){this.targetEnd.copy(this.target0),this.sphericalEnd.setFromVector3(this.position0),this.sphericalEnd.theta=this.sphericalEnd.theta%(2*Math.PI),this.spherical.theta=this.spherical.theta%(2*Math.PI),t||(this.target.copy(this.targetEnd),this.spherical.copy(this.sphericalEnd)),this.needsUpdate=!0}},{key:"getCameraPosition",value:function(){var t=this.target.clone(),e=new h.Vector3;return e.setFromSpherical(this.spherical).add(t),{position:e,target:t}}},{key:"setCameraPosition",value:function(t,e){this.target0.copy(e),this.position0.copy(t.clone().sub(e)),this.reset()}},{key:"update",value:function(t){var e=1;null!=t&&(e=this.dampingFactor*t/.016),e=h.Math.clamp(e,0,1);var n=this.sphericalEnd.theta-this.spherical.theta,i=this.sphericalEnd.phi-this.spherical.phi,s=this.sphericalEnd.radius-this.spherical.radius,r=(new h.Vector3).subVectors(this.targetEnd,this.target);Math.abs(n)>.001||Math.abs(i)>.001||Math.abs(s)>.001||Math.abs(r.x)>.001||Math.abs(r.y)>.001||Math.abs(r.z)>.001?(this.spherical.set(this.spherical.radius+s*e,this.spherical.phi+i*e,this.spherical.theta+n*e),this.target.add(r.multiplyScalar(e)),this.needsUpdate=!0):(this.spherical.copy(this.sphericalEnd),this.target.copy(this.targetEnd)),this.spherical.makeSafe(),this.object.position.setFromSpherical(this.spherical).add(this.target),this.object.lookAt(this.target),this.checkKeyboardEvents();var o=this.needsUpdate;return this.needsUpdate=!1,o}}]),t}()}])}); |
{ | ||
"name": "@cognite/3d-camera-controls", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"contributors": [ | ||
@@ -39,6 +39,3 @@ "Fredrik Anfinsen <fredrik.anfinsen@cognite.com>" | ||
"dev": "webpack --config webpack.config.js --watch --mode=development" | ||
}, | ||
"dependencies": { | ||
"game-keyboard": "^0.1.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
25517
0
- Removedgame-keyboard@^0.1.0
- Removedgame-keyboard@0.1.0(transitive)