Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

three-render-objects

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-render-objects - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

56

dist/three-render-objects.common.js

@@ -5,3 +5,3 @@ 'use strict';

var three = require('three');
var three$1 = require('three');
var ThreeTrackballControls = _interopDefault(require('three-trackballcontrols'));

@@ -47,18 +47,18 @@ var OrbitControlsWrapper = _interopDefault(require('three-orbit-controls'));

var three$1 = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists
var three = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists
: {
WebGLRenderer: three.WebGLRenderer,
Scene: three.Scene,
PerspectiveCamera: three.PerspectiveCamera,
Raycaster: three.Raycaster,
Vector2: three.Vector2,
Vector3: three.Vector3,
Color: three.Color,
EventDispatcher: three.EventDispatcher,
MOUSE: three.MOUSE,
Quaternion: three.Quaternion,
Spherical: three.Spherical
WebGLRenderer: three$1.WebGLRenderer,
Scene: three$1.Scene,
PerspectiveCamera: three$1.PerspectiveCamera,
Raycaster: three$1.Raycaster,
Vector2: three$1.Vector2,
Vector3: three$1.Vector3,
Color: three$1.Color,
EventDispatcher: three$1.EventDispatcher,
MOUSE: three$1.MOUSE,
Quaternion: three$1.Quaternion,
Spherical: three$1.Spherical
};
var ThreeOrbitControls = OrbitControlsWrapper(three$1);
var ThreeFlyControls = (FlyControlsWrapper(three$1), three$1.FlyControls);
var ThreeOrbitControls = OrbitControlsWrapper(three);
var ThreeFlyControls = (FlyControlsWrapper(three), three.FlyControls);
var threeRenderObjects = Kapsule({

@@ -68,4 +68,4 @@ props: {

default: window.innerWidth,
onChange: function onChange(width, state) {
isNaN(width) && (state.width = window.innerWidth);
onChange: function onChange(width, state, prevWidth) {
isNaN(width) && (state.width = prevWidth);
}

@@ -75,4 +75,4 @@ },

default: window.innerHeight,
onChange: function onChange(height, state) {
isNaN(height) && (state.height = window.innerHeight);
onChange: function onChange(height, state, prevHeight) {
isNaN(height) && (state.height = prevHeight);
}

@@ -86,3 +86,3 @@ },

if (alpha === undefined) alpha = 1;
state.renderer.setClearColor(new three$1.Color(polished.opacify(1, bckgColor)), alpha);
state.renderer.setClearColor(new three.Color(polished.opacify(1, bckgColor)), alpha);
}

@@ -155,3 +155,3 @@ },

if (!state.controlsDragging) {
var raycaster = new three$1.Raycaster();
var raycaster = new three.Raycaster();
raycaster.linePrecision = state.lineHoverPrecision;

@@ -219,7 +219,7 @@ raycaster.setFromCamera(state.mousePos, state.camera);

function setLookAt(lookAt) {
state.controls.target = new three$1.Vector3(lookAt.x, lookAt.y, lookAt.z);
state.controls.target = new three.Vector3(lookAt.x, lookAt.y, lookAt.z);
}
function getLookAt() {
return Object.assign(new three$1.Vector3(0, 0, -1000).applyQuaternion(camera.quaternion).add(camera.position));
return Object.assign(new three.Vector3(0, 0, -1000).applyQuaternion(camera.quaternion).add(camera.position));
}

@@ -246,4 +246,4 @@ },

return {
scene: new three$1.Scene(),
camera: new three$1.PerspectiveCamera()
scene: new three.Scene(),
camera: new three.PerspectiveCamera()
};

@@ -274,3 +274,3 @@ },

state.mousePos = new three$1.Vector2();
state.mousePos = new three.Vector2();
state.mousePos.x = -2; // Initialize off canvas

@@ -329,3 +329,3 @@

state.renderer = new three$1.WebGLRenderer(Object.assign({
state.renderer = new three.WebGLRenderer(Object.assign({
alpha: true

@@ -336,3 +336,3 @@ }, rendererConfig));

if (bckgAlpha === undefined) bckgAlpha = 1;
state.renderer.setClearColor(new three$1.Color(polished.opacify(1, state.backgroundColor)), bckgAlpha);
state.renderer.setClearColor(new three.Color(polished.opacify(1, state.backgroundColor)), bckgAlpha);
state.container.appendChild(state.renderer.domElement); // configure controls

@@ -339,0 +339,0 @@

@@ -1,2 +0,2 @@

// Version 1.4.2 three-render-objects - https://github.com/vasturiano/three-render-objects
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three")):"function"==typeof define&&define.amd?define(["three"],t):(e=e||self).ThreeRenderObjects=t(e.THREE)}(this,function(e){"use strict";var t="default"in e?e.default:e;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n pointer-events: none;\n}\n\n.scene-tooltip {\n color: lavender;\n font-size: 18px;\n transform: translate(-50%, 25px);\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: Sans-serif;\n}");var n,q=window.THREE||t,c=n=function(e,t){var i=this,r={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4};this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=[65,83,68],this.target=new q.Vector3;var n=new q.Vector3,s=r.NONE,o=r.NONE,a=new q.Vector3,c=new q.Vector2,u=new q.Vector2,l=new q.Vector3,d=0,h=new q.Vector2,p=new q.Vector2,f=0,m=0,g=new q.Vector2,b=new q.Vector2;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone();var v={type:"change"},y={type:"start"},w={type:"end"};this.handleResize=function(){if(this.domElement===document)this.screen.left=0,this.screen.top=0,this.screen.width=window.innerWidth,this.screen.height=window.innerHeight;else{var e=this.domElement.getBoundingClientRect(),t=this.domElement.ownerDocument.documentElement;this.screen.left=e.left+window.pageXOffset-t.clientLeft,this.screen.top=e.top+window.pageYOffset-t.clientTop,this.screen.width=e.width,this.screen.height=e.height}},this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)};var E,O,k,_,S,C,T,j,P,x,L,M,R=(E=new q.Vector2,function(e,t){return E.set((e-i.screen.left)/i.screen.width,(t-i.screen.top)/i.screen.height),E}),I=(O=new q.Vector2,function(e,t){return O.set((e-.5*i.screen.width-i.screen.left)/(.5*i.screen.width),(i.screen.height+2*(i.screen.top-t))/i.screen.width),O});function V(e,t){return Array.isArray(e)?-1!==e.indexOf(t):e===t}function D(e){!1!==i.enabled&&(window.removeEventListener("keydown",D),(o=s)===r.NONE&&(V(i.keys[r.ROTATE],e.keyCode)&&!i.noRotate?s=r.ROTATE:V(i.keys[r.ZOOM],e.keyCode)&&!i.noZoom?s=r.ZOOM:V(i.keys[r.PAN],e.keyCode)&&!i.noPan&&(s=r.PAN)))}function A(e){!1!==i.enabled&&(s=o,window.addEventListener("keydown",D,!1))}function N(e){!1!==i.enabled&&(e.preventDefault(),e.stopPropagation(),s===r.NONE&&(s=e.button),s!==r.ROTATE||i.noRotate?s!==r.ZOOM||i.noZoom?s!==r.PAN||i.noPan||(g.copy(R(e.pageX,e.pageY)),b.copy(g)):(h.copy(R(e.pageX,e.pageY)),p.copy(h)):(u.copy(I(e.pageX,e.pageY)),c.copy(u)),document.addEventListener("mousemove",U,!1),document.addEventListener("mouseup",F,!1),i.dispatchEvent(y))}function U(e){!1!==i.enabled&&(e.preventDefault(),e.stopPropagation(),s!==r.ROTATE||i.noRotate?s!==r.ZOOM||i.noZoom?s!==r.PAN||i.noPan||b.copy(R(e.pageX,e.pageY)):p.copy(R(e.pageX,e.pageY)):(c.copy(u),u.copy(I(e.pageX,e.pageY))))}function F(e){!1!==i.enabled&&(e.preventDefault(),e.stopPropagation(),s=r.NONE,document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",F),i.dispatchEvent(w))}function H(e){if(!1!==i.enabled){switch(e.preventDefault(),e.stopPropagation(),e.deltaMode){case 2:h.y-=.025*e.deltaY;break;case 1:h.y-=.01*e.deltaY;break;default:h.y-=25e-5*e.deltaY}i.dispatchEvent(y),i.dispatchEvent(w)}}function z(e){if(!1!==i.enabled){switch(e.touches.length){case 1:s=r.TOUCH_ROTATE,u.copy(I(e.touches[0].pageX,e.touches[0].pageY)),c.copy(u);break;default:s=r.TOUCH_ZOOM_PAN;var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;m=f=Math.sqrt(t*t+n*n);var o=(e.touches[0].pageX+e.touches[1].pageX)/2,a=(e.touches[0].pageY+e.touches[1].pageY)/2;g.copy(R(o,a)),b.copy(g)}i.dispatchEvent(y)}}function Y(e){if(!1!==i.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:c.copy(u),u.copy(I(e.touches[0].pageX,e.touches[0].pageY));break;default:var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;m=Math.sqrt(t*t+n*n);var o=(e.touches[0].pageX+e.touches[1].pageX)/2,a=(e.touches[0].pageY+e.touches[1].pageY)/2;b.copy(R(o,a))}}function Z(e){if(!1!==i.enabled){switch(e.touches.length){case 0:s=r.NONE;break;case 1:s=r.TOUCH_ROTATE,u.copy(I(e.touches[0].pageX,e.touches[0].pageY)),c.copy(u)}i.dispatchEvent(w)}}function X(e){!1!==i.enabled&&e.preventDefault()}this.rotateCamera=(_=new q.Vector3,S=new q.Quaternion,C=new q.Vector3,T=new q.Vector3,j=new q.Vector3,P=new q.Vector3,function(){P.set(u.x-c.x,u.y-c.y,0),(k=P.length())?(a.copy(i.object.position).sub(i.target),C.copy(a).normalize(),T.copy(i.object.up).normalize(),j.crossVectors(T,C).normalize(),T.setLength(u.y-c.y),j.setLength(u.x-c.x),P.copy(T.add(j)),_.crossVectors(P,a).normalize(),k*=i.rotateSpeed,S.setFromAxisAngle(_,k),a.applyQuaternion(S),i.object.up.applyQuaternion(S),l.copy(_),d=k):!i.staticMoving&&d&&(d*=Math.sqrt(1-i.dynamicDampingFactor),a.copy(i.object.position).sub(i.target),S.setFromAxisAngle(l,d),a.applyQuaternion(S),i.object.up.applyQuaternion(S)),c.copy(u)}),this.zoomCamera=function(){var e;s===r.TOUCH_ZOOM_PAN?(e=f/m,f=m,a.multiplyScalar(e)):(1!==(e=1+(p.y-h.y)*i.zoomSpeed)&&0<e&&a.multiplyScalar(e),i.staticMoving?h.copy(p):h.y+=(p.y-h.y)*this.dynamicDampingFactor)},this.panCamera=(x=new q.Vector2,L=new q.Vector3,M=new q.Vector3,function(){x.copy(b).sub(g),x.lengthSq()&&(x.multiplyScalar(a.length()*i.panSpeed),M.copy(a).cross(i.object.up).setLength(x.x),M.add(L.copy(i.object.up).setLength(x.y)),i.object.position.add(M),i.target.add(M),i.staticMoving?g.copy(b):g.add(x.subVectors(b,g).multiplyScalar(i.dynamicDampingFactor)))}),this.checkDistances=function(){i.noZoom&&i.noPan||(a.lengthSq()>i.maxDistance*i.maxDistance&&(i.object.position.addVectors(i.target,a.setLength(i.maxDistance)),h.copy(p)),a.lengthSq()<i.minDistance*i.minDistance&&(i.object.position.addVectors(i.target,a.setLength(i.minDistance)),h.copy(p)))},this.update=function(){a.subVectors(i.object.position,i.target),i.noRotate||i.rotateCamera(),i.noZoom||i.zoomCamera(),i.noPan||i.panCamera(),i.object.position.addVectors(i.target,a),i.checkDistances(),i.object.lookAt(i.target),1e-6<n.distanceToSquared(i.object.position)&&(i.dispatchEvent(v),n.copy(i.object.position))},this.reset=function(){s=r.NONE,o=r.NONE,i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.up.copy(i.up0),a.subVectors(i.object.position,i.target),i.object.lookAt(i.target),i.dispatchEvent(v),n.copy(i.object.position)},this.dispose=function(){this.domElement.removeEventListener("contextmenu",X,!1),this.domElement.removeEventListener("mousedown",N,!1),this.domElement.removeEventListener("wheel",H,!1),this.domElement.removeEventListener("touchstart",z,!1),this.domElement.removeEventListener("touchend",Z,!1),this.domElement.removeEventListener("touchmove",Y,!1),document.removeEventListener("mousemove",U,!1),document.removeEventListener("mouseup",F,!1),window.removeEventListener("keydown",D,!1),window.removeEventListener("keyup",A,!1)},this.domElement.addEventListener("contextmenu",X,!1),this.domElement.addEventListener("mousedown",N,!1),this.domElement.addEventListener("wheel",H,!1),this.domElement.addEventListener("touchstart",z,!1),this.domElement.addEventListener("touchend",Z,!1),this.domElement.addEventListener("touchmove",Y,!1),window.addEventListener("keydown",D,!1),window.addEventListener("keyup",A,!1),this.handleResize(),this.update()};n.prototype=Object.create(q.EventDispatcher.prototype);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function a(e){return Math.round(255*e)}function d(e,t,n){return a(e)+","+a(t)+","+a(n)}function h(e,t,n,o){if(void 0===o&&(o=d),0===t)return o(n,n,n);var a=e%360/60,i=(1-Math.abs(2*n-1))*t,r=i*(1-Math.abs(a%2-1)),s=0,c=0,u=0;0<=a&&a<1?(s=i,c=r):1<=a&&a<2?(s=r,c=i):2<=a&&a<3?(c=i,u=r):3<=a&&a<4?(c=r,u=i):4<=a&&a<5?(s=r,u=i):5<=a&&a<6&&(s=i,u=r);var l=n-i/2;return o(s+l,c+l,u+l)}var p={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var f=/^#[a-fA-F0-9]{6}$/,m=/^#[a-fA-F0-9]{8}$/,g=/^#[a-fA-F0-9]{3}$/,b=/^#[a-fA-F0-9]{4}$/,v=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,y=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,w=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,E=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;function u(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return p[t]?"#"+p[t]:e}(e);if(t.match(f))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(m)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(g))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(b)){var o=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:o}}var a=v.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var i=y.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])};var r=w.exec(t);if(r){var s="rgb("+h(parseInt(""+r[1],10),parseInt(""+r[2],10)/100,parseInt(""+r[3],10)/100)+")",c=v.exec(s);if(!c)throw new Error("Couldn't generate valid rgb string from "+t+", it returned "+s+".");return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var u=E.exec(t);if(u){var l="rgb("+h(parseInt(""+u[1],10),parseInt(""+u[2],10)/100,parseInt(""+u[3],10)/100)+")",d=v.exec(l);if(!d)throw new Error("Couldn't generate valid rgb string from "+t+", it returned "+l+".");return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10),alpha:parseFloat(""+u[4])}}throw new Error("Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.")}var i=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function r(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function s(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return i("#"+r(e)+r(t)+r(n));if("object"==typeof e&&void 0===t&&void 0===n)return i("#"+r(e.red)+r(e.green)+r(e.blue));throw new Error("Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).")}function l(e,t,n,o){if("string"==typeof e&&"number"==typeof t){var a=u(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof o)return 1<=o?s(e,t,n):"rgba("+e+","+t+","+n+","+o+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===o)return 1<=e.alpha?s(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Error("Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).")}function O(e){return function t(n,o,a){return function(){var e=a.concat(Array.prototype.slice.call(arguments));return e.length>=o?n.apply(this,e):t(n,o,e)}}(e,e.length,[])}function k(e,t,n){return Math.max(e,Math.min(t,n))}function _(e,t){var n=u(t);return l(o({},n,{alpha:k(0,1,(100*("number"==typeof n.alpha?n.alpha:1)+100*parseFloat(e))/100)}))}var S=O(_);"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function T(e,t){return e(t={exports:{}},t.exports),t.exports}var j,P=T(function(e,t){var n=function(){this._tweens={},this._tweensAddedDuringUpdate={}};n.prototype={getAll:function(){return Object.keys(this._tweens).map(function(e){return this._tweens[e]}.bind(this))},removeAll:function(){this._tweens={}},add:function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},remove:function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},update:function(e,t){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(e=void 0!==e?e:s.now();0<n.length;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var a=this._tweens[n[o]];a&&!1===a.update(e)&&(a._isPlaying=!1,t||delete this._tweens[n[o]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var o,s=new n;s.Group=n,s._nextId=0,s.nextId=function(){return s._nextId++},"undefined"==typeof window&&"undefined"!=typeof process&&process.hrtime?s.now=function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?s.now=window.performance.now.bind(window.performance):void 0!==Date.now?s.now=Date.now:s.now=function(){return(new Date).getTime()},s.Tween=function(e,t){this._object=e,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=s.Easing.Linear.None,this._interpolationFunction=s.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||s,this._id=s.nextId()},s.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(e,t){return this._valuesEnd=e,void 0!==t&&(this._duration=t),this},start:function(e){for(var t in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==e?"string"==typeof e?s.now()+parseFloat(e):e:s.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(0===this._valuesEnd[t].length)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}void 0!==this._object[t]&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array==!1&&(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying&&(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens()),this},end:function(){return this.update(this._startTime+this._duration),this},stopChainedTweens:function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop()},group:function(e){return this._group=e,this},delay:function(e){return this._delayTime=e,this},repeat:function(e){return this._repeat=e,this},repeatDelay:function(e){return this._repeatDelayTime=e,this},yoyo:function(e){return this._yoyo=e,this},easing:function(e){return this._easingFunction=e,this},interpolation:function(e){return this._interpolationFunction=e,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(e){return this._onStartCallback=e,this},onUpdate:function(e){return this._onUpdateCallback=e,this},onComplete:function(e){return this._onCompleteCallback=e,this},onStop:function(e){return this._onStopCallback=e,this},update:function(e){var t,n,o;if(e<this._startTime)return!0;for(t in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(e-this._startTime)/this._duration,n=0===this._duration||1<n?1:n,o=this._easingFunction(n),this._valuesEnd)if(void 0!==this._valuesStart[t]){var a=this._valuesStart[t]||0,i=this._valuesEnd[t];i instanceof Array?this._object[t]=this._interpolationFunction(i,o):("string"==typeof i&&(i="+"===i.charAt(0)||"-"===i.charAt(0)?a+parseFloat(i):parseFloat(i)),"number"==typeof i&&(this._object[t]=a+(i-a)*o))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object),1!==n)return!0;if(0<this._repeat){for(t in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[t]&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo){var r=this._valuesStartRepeat[t];this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=r}this._valuesStart[t]=this._valuesStartRepeat[t]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,c=this._chainedTweens.length;s<c;s++)this._chainedTweens[s].start(this._startTime+this._duration);return!1}},s.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){return e*e*(2.70158*e-1.70158)},Out:function(e){return--e*e*(2.70158*e+1.70158)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-s.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*s.Easing.Bounce.In(2*e):.5*s.Easing.Bounce.Out(2*e-1)+.5}}},s.Interpolation={Linear:function(e,t){var n=e.length-1,o=n*t,a=Math.floor(o),i=s.Interpolation.Utils.Linear;return t<0?i(e[0],e[1],o):1<t?i(e[n],e[n-1],n-o):i(e[a],e[n<a+1?n:a+1],o-a)},Bezier:function(e,t){for(var n=0,o=e.length-1,a=Math.pow,i=s.Interpolation.Utils.Bernstein,r=0;r<=o;r++)n+=a(1-t,o-r)*a(t,r)*e[r]*i(o,r);return n},CatmullRom:function(e,t){var n=e.length-1,o=n*t,a=Math.floor(o),i=s.Interpolation.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(a=Math.floor(o=n*(1+t))),i(e[(a-1+n)%n],e[a],e[(a+1)%n],e[(a+2)%n],o-a)):t<0?e[0]-(i(e[0],e[0],e[1],e[1],-o)-e[0]):1<t?e[n]-(i(e[n],e[n],e[n-1],e[n-1],o-n)-e[n]):i(e[a?a-1:0],e[a],e[n<a+1?n:a+1],e[n<a+2?n:a+2],o-a)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=s.Interpolation.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(o=[1],function(e){var t=1;if(o[e])return o[e];for(var n=e;1<n;n--)t*=n;return o[e]=t}),CatmullRom:function(e,t,n,o,a){var i=.5*(n-e),r=.5*(o-t),s=a*a;return(2*t-2*n+i+r)*(a*s)+(-3*t+3*n-2*i-r)*s+i*a+t}}},e.exports=s}),x=T(function(e,t){e.exports=function(n){function o(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var a={};return o.m=n,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,n){var o,a,i;a=[e,t],void 0!==(i="function"==typeof(o=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return t instanceof Function?t:"string"==typeof t?function(e){return e[t]}:function(e){return t}},e.exports=t.default})?o.apply(t,a):o)&&(e.exports=i)}])}),L=C(x),M=(x.accessorFn,T(function(e,t){"undefined"!=typeof self&&self,e.exports=function(n){var o={};function a(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=n,a.c=o,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,n){var o,a,i,r;r=function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.stateInit,o=void 0===t?function(){return{}}:t,n=e.props,a=void 0===n?{}:n,i=e.methods,s=void 0===i?{}:i,r=e.aliases,c=void 0===r?{}:r,u=e.init,l=void 0===u?function(){}:u,d=e.update,h=void 0===d?function(){}:d,p=Object.keys(a).map(function(e){return new g(e,a[e])});return function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=Object.assign({},o instanceof Function?o(t):o,{initialised:!1});function r(e){return n(e,t),a(),r}var n=function(e,t){l.call(r,e,i,t),i.initialised=!0},a=(0,f.default)(function(){i.initialised&&h.call(r,i)},1);return p.forEach(function(e){r[e.name]=function(t){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(e,t){};return function(e){return arguments.length?(i[t]=e,o.call(r,e,i),n&&a(),r):i[t]}}(e.name,e.triggerUpdate,e.onChange)}),Object.keys(s).forEach(function(a){r[a]=function(){for(var e,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=s[a]).call.apply(e,[r,i].concat(n))}}),Object.entries(c).forEach(function(e){var t=m(e,2),n=t[0],o=t[1];return r[n]=r[o]}),r.resetProps=function(){return p.forEach(function(e){r[e.name](e.defaultVal)}),r},r.resetProps(),i._rerender=a,r}};var o,f=(o=n)&&o.__esModule?o:{default:o},m=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,a=!1,i=void 0;try{for(var r,s=e[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);o=!0);}catch(e){a=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function e(t,n){var o=n.default,a=void 0===o?null:o,i=n.triggerUpdate,r=void 0===i||i,s=n.onChange,c=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=a,this.triggerUpdate=r,this.onChange=c};e.exports=t.default},a=[e,t,n(1)],void 0===(i="function"==typeof(o=r)?o.apply(t,a):o)||(e.exports=i)},function(e,t){e.exports=function(t,n,o){var a,i,r,s,c;function u(){var e=Date.now()-s;e<n&&0<=e?a=setTimeout(u,n-e):(a=null,o||(c=t.apply(r,i),r=i=null))}null==n&&(n=100);var e=function(){r=this,i=arguments,s=Date.now();var e=o&&!a;return a||(a=setTimeout(u,n)),e&&(c=t.apply(r,i),r=i=null),c};return e.clear=function(){a&&(clearTimeout(a),a=null)},e.flush=function(){a&&(c=t.apply(r,i),r=i=null,clearTimeout(a),a=null)},e}}])})),R=C(M),I=(M.Kapsule,window.THREE?window.THREE:{WebGLRenderer:e.WebGLRenderer,Scene:e.Scene,PerspectiveCamera:e.PerspectiveCamera,Raycaster:e.Raycaster,Vector2:e.Vector2,Vector3:e.Vector3,Color:e.Color,EventDispatcher:e.EventDispatcher,MOUSE:e.MOUSE,Quaternion:e.Quaternion,Spherical:e.Spherical}),V=function(B){function e(e,t){var n,o,a,i,r;this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new B.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:B.MOUSE.LEFT,ZOOM:B.MOUSE.MIDDLE,PAN:B.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),h=d.NONE},this.update=(n=new B.Vector3,o=(new B.Quaternion).setFromUnitVectors(e.up,new B.Vector3(0,1,0)),a=o.clone().inverse(),i=new B.Vector3,r=new B.Quaternion,function(){var e=s.object.position;return n.copy(e).sub(s.target),n.applyQuaternion(o),f.setFromVector3(n),s.autoRotate&&h===d.NONE&&P(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=g,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(b),n.setFromSpherical(f),n.applyQuaternion(a),e.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor):m.set(0,0,0),g=1,b.set(0,0,0),!(!(v||i.distanceToSquared(s.object.position)>p||8*(1-r.dot(s.object.quaternion))>p)||(s.dispatchEvent(c),i.copy(s.object.position),r.copy(s.object.quaternion),v=!1))}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",Q,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",Z,!1),s.domElement.removeEventListener("touchend",q,!1),s.domElement.removeEventListener("touchmove",X,!1),document.removeEventListener("mousemove",F,!1),document.removeEventListener("mouseup",H,!1),window.removeEventListener("keydown",Y,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},d={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},h=d.NONE,p=1e-6,f=new B.Spherical,m=new B.Spherical,g=1,b=new B.Vector3,v=!1,y=new B.Vector2,w=new B.Vector2,E=new B.Vector2,O=new B.Vector2,k=new B.Vector2,_=new B.Vector2,S=new B.Vector2,C=new B.Vector2,T=new B.Vector2;function j(){return Math.pow(.95,s.zoomSpeed)}function P(e){m.theta-=e}function x(e){m.phi-=e}var L,M,R,I=(L=new B.Vector3,function(e,t){L.setFromMatrixColumn(t,0),L.multiplyScalar(-e),b.add(L)}),V=(M=new B.Vector3,function(e,t){M.setFromMatrixColumn(t,1),M.multiplyScalar(e),b.add(M)}),D=(R=new B.Vector3,function(e,t){var n=s.domElement===document?s.domElement.body:s.domElement;if(s.object instanceof B.PerspectiveCamera){var o=s.object.position;R.copy(o).sub(s.target);var a=R.length();a*=Math.tan(s.object.fov/2*Math.PI/180),I(2*e*a/n.clientHeight,s.object.matrix),V(2*t*a/n.clientHeight,s.object.matrix)}else s.object instanceof B.OrthographicCamera?(I(e*(s.object.right-s.object.left)/s.object.zoom/n.clientWidth,s.object.matrix),V(t*(s.object.top-s.object.bottom)/s.object.zoom/n.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)});function A(e){s.object instanceof B.PerspectiveCamera?g/=e:s.object instanceof B.OrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function N(e){s.object instanceof B.PerspectiveCamera?g*=e:s.object instanceof B.OrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(e){if(!1!==s.enabled){if(e.preventDefault(),e.button===s.mouseButtons.ORBIT){if(!1===s.enableRotate)return;o=e,y.set(o.clientX,o.clientY),h=d.ROTATE}else if(e.button===s.mouseButtons.ZOOM){if(!1===s.enableZoom)return;n=e,S.set(n.clientX,n.clientY),h=d.DOLLY}else if(e.button===s.mouseButtons.PAN){if(!1===s.enablePan)return;t=e,O.set(t.clientX,t.clientY),h=d.PAN}var t,n,o;h!==d.NONE&&(document.addEventListener("mousemove",F,!1),document.addEventListener("mouseup",H,!1),s.dispatchEvent(u))}}function F(e){var t,n;if(!1!==s.enabled)if(e.preventDefault(),h===d.ROTATE){if(!1===s.enableRotate)return;!function(e){w.set(e.clientX,e.clientY),E.subVectors(w,y);var t=s.domElement===document?s.domElement.body:s.domElement;P(2*Math.PI*E.x/t.clientWidth*s.rotateSpeed),x(2*Math.PI*E.y/t.clientHeight*s.rotateSpeed),y.copy(w),s.update()}(e)}else if(h===d.DOLLY){if(!1===s.enableZoom)return;n=e,C.set(n.clientX,n.clientY),T.subVectors(C,S),0<T.y?A(j()):T.y<0&&N(j()),S.copy(C),s.update()}else if(h===d.PAN){if(!1===s.enablePan)return;t=e,k.set(t.clientX,t.clientY),_.subVectors(k,O),D(_.x,_.y),O.copy(k),s.update()}}function H(e){!1!==s.enabled&&(document.removeEventListener("mousemove",F,!1),document.removeEventListener("mouseup",H,!1),s.dispatchEvent(l),h=d.NONE)}function z(e){var t;!1===s.enabled||!1===s.enableZoom||h!==d.NONE&&h!==d.ROTATE||(e.preventDefault(),e.stopPropagation(),(t=e).deltaY<0?N(j()):0<t.deltaY&&A(j()),s.update(),s.dispatchEvent(u),s.dispatchEvent(l))}function Y(e){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(e){switch(e.keyCode){case s.keys.UP:D(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:D(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:D(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:D(-s.keyPanSpeed,0),s.update()}}(e)}function Z(e){if(!1!==s.enabled){switch(e.touches.length){case 1:if(!1===s.enableRotate)return;r=e,y.set(r.touches[0].pageX,r.touches[0].pageY),h=d.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom)return;o=(n=e).touches[0].pageX-n.touches[1].pageX,a=n.touches[0].pageY-n.touches[1].pageY,i=Math.sqrt(o*o+a*a),S.set(0,i),h=d.TOUCH_DOLLY;break;case 3:if(!1===s.enablePan)return;t=e,O.set(t.touches[0].pageX,t.touches[0].pageY),h=d.TOUCH_PAN;break;default:h=d.NONE}var t,n,o,a,i,r;h!==d.NONE&&s.dispatchEvent(u)}}function X(e){var t,n,o,a,i;if(!1!==s.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===s.enableRotate)return;if(h!==d.TOUCH_ROTATE)return;!function(e){w.set(e.touches[0].pageX,e.touches[0].pageY),E.subVectors(w,y);var t=s.domElement===document?s.domElement.body:s.domElement;P(2*Math.PI*E.x/t.clientWidth*s.rotateSpeed),x(2*Math.PI*E.y/t.clientHeight*s.rotateSpeed),y.copy(w),s.update()}(e);break;case 2:if(!1===s.enableZoom)return;if(h!==d.TOUCH_DOLLY)return;o=(n=e).touches[0].pageX-n.touches[1].pageX,a=n.touches[0].pageY-n.touches[1].pageY,i=Math.sqrt(o*o+a*a),C.set(0,i),T.subVectors(C,S),0<T.y?N(j()):T.y<0&&A(j()),S.copy(C),s.update();break;case 3:if(!1===s.enablePan)return;if(h!==d.TOUCH_PAN)return;t=e,k.set(t.touches[0].pageX,t.touches[0].pageY),_.subVectors(k,O),D(_.x,_.y),O.copy(k),s.update();break;default:h=d.NONE}}function q(e){!1!==s.enabled&&(s.dispatchEvent(l),h=d.NONE)}function Q(e){e.preventDefault()}s.domElement.addEventListener("contextmenu",Q,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",Z,!1),s.domElement.addEventListener("touchend",q,!1),s.domElement.addEventListener("touchmove",X,!1),window.addEventListener("keydown",Y,!1),this.update()}return(e.prototype=Object.create(B.EventDispatcher.prototype)).constructor=e,Object.defineProperties(e.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.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}}),e}(I),D=((j=I).FlyControls=function(e,t,n){this.object=e,n=n||{},this.domElement=void 0!==t?t:document,t&&this.domElement.setAttribute("tabindex",-1),this.movementSpeed=void 0===n.movementSpeed?1:n.movementSpeed,this.rollSpeed=void 0===n.rollSpeed?.005:n.rollSpeed,this.dragToLook=!0,this.autoForward=!1,this.tmpQuaternion=new j.Quaternion,this.mouseStatus=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new j.Vector3(0,0,0),this.rotationVector=new j.Vector3(0,0,0);var a=Date.now();function o(e,t){return function(){t.apply(e,arguments)}}this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)},this.keydown=function(e){if(!e.altKey){switch(e.keyCode){case 16:this.movementSpeedMultiplier=.1;break;case 87:this.moveState.forward=1;break;case 83:this.moveState.back=1;break;case 65:this.moveState.left=1;break;case 68:this.moveState.right=1;break;case 82:this.moveState.up=1;break;case 70:this.moveState.down=1;break;case 38:this.moveState.pitchUp=1;break;case 40:this.moveState.pitchDown=1;break;case 37:this.moveState.yawLeft=1;break;case 39:this.moveState.yawRight=1;break;case 81:this.moveState.rollLeft=1;break;case 69:this.moveState.rollRight=1}-1<[38,40,37,39].indexOf(e.keyCode)&&e.preventDefault(),this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.keyCode){case 16:this.movementSpeedMultiplier=1;break;case 87:this.moveState.forward=0;break;case 83:this.moveState.back=0;break;case 65:this.moveState.left=0;break;case 68:this.moveState.right=0;break;case 82:this.moveState.up=0;break;case 70:this.moveState.down=0;break;case 38:this.moveState.pitchUp=0;break;case 40:this.moveState.pitchDown=0;break;case 37:this.moveState.yawLeft=0;break;case 39:this.moveState.yawRight=0;break;case 81:this.moveState.rollLeft=0;break;case 69:this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.mousedown=function(e){if(this.domElement!==document&&this.domElement.focus(),e.preventDefault(),e.stopPropagation(),this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.mousemove=function(e){if(!this.dragToLook||0<this.mouseStatus){var t=this.getContainerDimensions(),n=t.size[0]/2,o=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-o)/o,this.updateRotationVector()}},this.mouseout=function(e){e.preventDefault(),e.stopPropagation(),this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.updateRotationVector(),this.updateMovementVector()},this.mouseup=function(e){if(e.preventDefault(),e.stopPropagation(),this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){var t=Date.now(),n=(e=(t-a)/10)*this.movementSpeed,o=e*this.rollSpeed;this.object.translateX(this.moveVector.x*n),this.object.translateY(this.moveVector.y*n),this.object.translateZ(this.moveVector.z*n),this.tmpQuaternion.set(this.rotationVector.x*o,this.rotationVector.y*o,this.rotationVector.z*o,1).normalize(),this.object.quaternion.multiply(this.tmpQuaternion),this.object.rotation.setFromQuaternion(this.object.quaternion,this.object.rotation.order),a=t},this.updateMovementVector=function(){var e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.domElement.addEventListener("contextmenu",function(e){e.preventDefault()},!1),this.domElement.addEventListener("mousemove",o(this,this.mousemove),!1),this.domElement.addEventListener("mousedown",o(this,this.mousedown),!1),this.domElement.addEventListener("mouseup",o(this,this.mouseup),!1),this.domElement.addEventListener("mouseout",o(this,this.mouseout),!1),this.domElement.addEventListener("keydown",o(this,this.keydown),!1),this.domElement.addEventListener("keyup",o(this,this.keyup),!1),this.updateMovementVector(),this.updateRotationVector()},I.FlyControls);return R({props:{width:{default:window.innerWidth,onChange:function(e,t){isNaN(e)&&(t.width=window.innerWidth)}},height:{default:window.innerHeight,onChange:function(e,t){isNaN(e)&&(t.height=window.innerHeight)}},backgroundColor:{default:"#000011",onChange:function(e,t){if(t.renderer){var n=u(e).alpha;void 0===n&&(n=1),t.renderer.setClearColor(new I.Color(S(1,e)),n)}},triggerUpdate:!1},showNavInfo:{default:!0},objects:{default:[],onChange:function(e,t){(t.prevObjs||[]).forEach(function(e){return t.scene.remove(e)}),(t.prevObjs=e).forEach(function(e){return t.scene.add(e)})},triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(),e.renderer.render(e.scene,e.camera),e.enablePointerInteraction){var t=null;if(!e.controlsDragging){var n=new I.Raycaster;n.linePrecision=e.lineHoverPrecision,n.setFromCamera(e.mousePos,e.camera);var o=n.intersectObjects(e.objects,!0).map(function(e){return e.object}).sort(e.hoverOrderComparator);t=!e.controlsDragging&&o.length?o[0]:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&L(e.tooltipContent)(t)||"",e.hoverObj=t)}P.update()}return this},cameraPosition:function(t,e,n,o){var a=t.camera;if(e&&t.initialised){var i=e,r=n||{x:0,y:0,z:0};if(o){var s=Object.assign({},a.position),c=d();new P.Tween(s).to(i,o).easing(P.Easing.Quadratic.Out).onUpdate(u).start(),new P.Tween(c).to(r,o/3).easing(P.Easing.Quadratic.Out).onUpdate(l).start()}else u(i),l(r);return this}return Object.assign({},a.position,{lookAt:d()});function u(e){var t=e.x,n=e.y,o=e.z;void 0!==t&&(a.position.x=t),void 0!==n&&(a.position.y=n),void 0!==o&&(a.position.z=o)}function l(e){t.controls.target=new I.Vector3(e.x,e.y,e.z)}function d(){return Object.assign(new I.Vector3(0,0,-1e3).applyQuaternion(a.quaternion).add(a.position))}},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new I.Scene,camera:new I.PerspectiveCamera}},init:function(e,s,t){var n=t.controlType,o=void 0===n?"trackball":n,a=t.rendererConfig,i=void 0===a?{}:a;e.innerHTML="",e.appendChild(s.container=document.createElement("div")),s.container.style.position="relative",s.container.appendChild(s.navInfo=document.createElement("div")),s.navInfo.className="scene-nav-info",s.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[o]||"",s.toolTipElem=document.createElement("div"),s.toolTipElem.classList.add("scene-tooltip"),s.container.appendChild(s.toolTipElem),s.mousePos=new I.Vector2,s.mousePos.x=-2,s.mousePos.y=-2,s.container.addEventListener("mousemove",function(e){if(s.enablePointerInteraction){var t=(o=s.container,a=o.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,{top:a.top+r,left:a.left+i}),n={x:e.pageX-t.left,y:e.pageY-t.top};s.mousePos.x=n.x/s.width*2-1,s.mousePos.y=-n.y/s.height*2+1,s.toolTipElem.style.top="".concat(n.y,"px"),s.toolTipElem.style.left="".concat(n.x,"px")}var o,a,i,r},!1),s.container.addEventListener("click",function(e){s.ignoreOneClick?s.ignoreOneClick=!1:s.hoverObj&&s.onClick(s.hoverObj)},!1),s.container.addEventListener("contextmenu",function(e){return!s.onRightClick||(e.preventDefault(),s.hoverObj&&s.onRightClick(s.hoverObj),!1)},!1),s.renderer=new I.WebGLRenderer(Object.assign({alpha:!0},i)),s.renderer.setPixelRatio(window.devicePixelRatio);var r=u(s.backgroundColor).alpha;void 0===r&&(r=1),s.renderer.setClearColor(new I.Color(S(1,s.backgroundColor)),r),s.container.appendChild(s.renderer.domElement),s.controls=new{trackball:c,orbit:V,fly:D}[o](s.camera,s.renderer.domElement),"fly"===o&&(s.controls.movementSpeed=2.5),"trackball"!==o&&"orbit"!==o||(s.controls.minDistance=.1,s.controls.maxDistance=5e4,s.controls.addEventListener("start",function(){return s.controlsEngaged=!0}),s.controls.addEventListener("change",function(){s.controlsEngaged&&(s.controlsDragging=!0,s.ignoreOneClick=!0)}),s.controls.addEventListener("end",function(){s.controlsEngaged=!1,s.controlsDragging=!1})),s.renderer.setSize(s.width,s.height),s.camera.position.z=1e3,s.camera.far=5e4,window.scene=s.scene},update:function(e){e.width&&e.height&&(e.container.style.width=e.width,e.container.style.height=e.height,e.renderer.setSize(e.width,e.height),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),e.navInfo.style.display=e.showNavInfo?null:"none"}})});
// Version 1.4.3 three-render-objects - https://github.com/vasturiano/three-render-objects
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three")):"function"==typeof define&&define.amd?define(["three"],t):(e=e||self).ThreeRenderObjects=t(e.THREE)}(this,function(e){"use strict";var t="default"in e?e.default:e;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n pointer-events: none;\n}\n\n.scene-tooltip {\n color: lavender;\n font-size: 18px;\n transform: translate(-50%, 25px);\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: Sans-serif;\n}");var n,q=window.THREE||t,c=n=function(e,t){var r=this,i={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4};this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=[65,83,68],this.target=new q.Vector3;var n=new q.Vector3,s=i.NONE,o=i.NONE,a=new q.Vector3,c=new q.Vector2,u=new q.Vector2,l=new q.Vector3,d=0,h=new q.Vector2,p=new q.Vector2,f=0,m=0,g=new q.Vector2,b=new q.Vector2;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone();var v={type:"change"},y={type:"start"},w={type:"end"};this.handleResize=function(){if(this.domElement===document)this.screen.left=0,this.screen.top=0,this.screen.width=window.innerWidth,this.screen.height=window.innerHeight;else{var e=this.domElement.getBoundingClientRect(),t=this.domElement.ownerDocument.documentElement;this.screen.left=e.left+window.pageXOffset-t.clientLeft,this.screen.top=e.top+window.pageYOffset-t.clientTop,this.screen.width=e.width,this.screen.height=e.height}},this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)};var E,O,k,S,_,x,C,j,P,T,R,L,M=(E=new q.Vector2,function(e,t){return E.set((e-r.screen.left)/r.screen.width,(t-r.screen.top)/r.screen.height),E}),I=(O=new q.Vector2,function(e,t){return O.set((e-.5*r.screen.width-r.screen.left)/(.5*r.screen.width),(r.screen.height+2*(r.screen.top-t))/r.screen.width),O});function D(e,t){return Array.isArray(e)?-1!==e.indexOf(t):e===t}function V(e){!1!==r.enabled&&(window.removeEventListener("keydown",V),(o=s)===i.NONE&&(D(r.keys[i.ROTATE],e.keyCode)&&!r.noRotate?s=i.ROTATE:D(r.keys[i.ZOOM],e.keyCode)&&!r.noZoom?s=i.ZOOM:D(r.keys[i.PAN],e.keyCode)&&!r.noPan&&(s=i.PAN)))}function A(e){!1!==r.enabled&&(s=o,window.addEventListener("keydown",V,!1))}function F(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),s===i.NONE&&(s=e.button),s!==i.ROTATE||r.noRotate?s!==i.ZOOM||r.noZoom?s!==i.PAN||r.noPan||(g.copy(M(e.pageX,e.pageY)),b.copy(g)):(h.copy(M(e.pageX,e.pageY)),p.copy(h)):(u.copy(I(e.pageX,e.pageY)),c.copy(u)),document.addEventListener("mousemove",N,!1),document.addEventListener("mouseup",U,!1),r.dispatchEvent(y))}function N(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),s!==i.ROTATE||r.noRotate?s!==i.ZOOM||r.noZoom?s!==i.PAN||r.noPan||b.copy(M(e.pageX,e.pageY)):p.copy(M(e.pageX,e.pageY)):(c.copy(u),u.copy(I(e.pageX,e.pageY))))}function U(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),s=i.NONE,document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",U),r.dispatchEvent(w))}function z(e){if(!1!==r.enabled){switch(e.preventDefault(),e.stopPropagation(),e.deltaMode){case 2:h.y-=.025*e.deltaY;break;case 1:h.y-=.01*e.deltaY;break;default:h.y-=25e-5*e.deltaY}r.dispatchEvent(y),r.dispatchEvent(w)}}function H(e){if(!1!==r.enabled){switch(e.touches.length){case 1:s=i.TOUCH_ROTATE,u.copy(I(e.touches[0].pageX,e.touches[0].pageY)),c.copy(u);break;default:s=i.TOUCH_ZOOM_PAN;var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;m=f=Math.sqrt(t*t+n*n);var o=(e.touches[0].pageX+e.touches[1].pageX)/2,a=(e.touches[0].pageY+e.touches[1].pageY)/2;g.copy(M(o,a)),b.copy(g)}r.dispatchEvent(y)}}function Y(e){if(!1!==r.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:c.copy(u),u.copy(I(e.touches[0].pageX,e.touches[0].pageY));break;default:var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;m=Math.sqrt(t*t+n*n);var o=(e.touches[0].pageX+e.touches[1].pageX)/2,a=(e.touches[0].pageY+e.touches[1].pageY)/2;b.copy(M(o,a))}}function Z(e){if(!1!==r.enabled){switch(e.touches.length){case 0:s=i.NONE;break;case 1:s=i.TOUCH_ROTATE,u.copy(I(e.touches[0].pageX,e.touches[0].pageY)),c.copy(u)}r.dispatchEvent(w)}}function X(e){!1!==r.enabled&&e.preventDefault()}this.rotateCamera=(S=new q.Vector3,_=new q.Quaternion,x=new q.Vector3,C=new q.Vector3,j=new q.Vector3,P=new q.Vector3,function(){P.set(u.x-c.x,u.y-c.y,0),(k=P.length())?(a.copy(r.object.position).sub(r.target),x.copy(a).normalize(),C.copy(r.object.up).normalize(),j.crossVectors(C,x).normalize(),C.setLength(u.y-c.y),j.setLength(u.x-c.x),P.copy(C.add(j)),S.crossVectors(P,a).normalize(),k*=r.rotateSpeed,_.setFromAxisAngle(S,k),a.applyQuaternion(_),r.object.up.applyQuaternion(_),l.copy(S),d=k):!r.staticMoving&&d&&(d*=Math.sqrt(1-r.dynamicDampingFactor),a.copy(r.object.position).sub(r.target),_.setFromAxisAngle(l,d),a.applyQuaternion(_),r.object.up.applyQuaternion(_)),c.copy(u)}),this.zoomCamera=function(){var e;s===i.TOUCH_ZOOM_PAN?(e=f/m,f=m,a.multiplyScalar(e)):(1!==(e=1+(p.y-h.y)*r.zoomSpeed)&&0<e&&a.multiplyScalar(e),r.staticMoving?h.copy(p):h.y+=(p.y-h.y)*this.dynamicDampingFactor)},this.panCamera=(T=new q.Vector2,R=new q.Vector3,L=new q.Vector3,function(){T.copy(b).sub(g),T.lengthSq()&&(T.multiplyScalar(a.length()*r.panSpeed),L.copy(a).cross(r.object.up).setLength(T.x),L.add(R.copy(r.object.up).setLength(T.y)),r.object.position.add(L),r.target.add(L),r.staticMoving?g.copy(b):g.add(T.subVectors(b,g).multiplyScalar(r.dynamicDampingFactor)))}),this.checkDistances=function(){r.noZoom&&r.noPan||(a.lengthSq()>r.maxDistance*r.maxDistance&&(r.object.position.addVectors(r.target,a.setLength(r.maxDistance)),h.copy(p)),a.lengthSq()<r.minDistance*r.minDistance&&(r.object.position.addVectors(r.target,a.setLength(r.minDistance)),h.copy(p)))},this.update=function(){a.subVectors(r.object.position,r.target),r.noRotate||r.rotateCamera(),r.noZoom||r.zoomCamera(),r.noPan||r.panCamera(),r.object.position.addVectors(r.target,a),r.checkDistances(),r.object.lookAt(r.target),1e-6<n.distanceToSquared(r.object.position)&&(r.dispatchEvent(v),n.copy(r.object.position))},this.reset=function(){s=i.NONE,o=i.NONE,r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.up.copy(r.up0),a.subVectors(r.object.position,r.target),r.object.lookAt(r.target),r.dispatchEvent(v),n.copy(r.object.position)},this.dispose=function(){this.domElement.removeEventListener("contextmenu",X,!1),this.domElement.removeEventListener("mousedown",F,!1),this.domElement.removeEventListener("wheel",z,!1),this.domElement.removeEventListener("touchstart",H,!1),this.domElement.removeEventListener("touchend",Z,!1),this.domElement.removeEventListener("touchmove",Y,!1),document.removeEventListener("mousemove",N,!1),document.removeEventListener("mouseup",U,!1),window.removeEventListener("keydown",V,!1),window.removeEventListener("keyup",A,!1)},this.domElement.addEventListener("contextmenu",X,!1),this.domElement.addEventListener("mousedown",F,!1),this.domElement.addEventListener("wheel",z,!1),this.domElement.addEventListener("touchstart",H,!1),this.domElement.addEventListener("touchend",Z,!1),this.domElement.addEventListener("touchmove",Y,!1),window.addEventListener("keydown",V,!1),window.addEventListener("keyup",A,!1),this.handleResize(),this.update()};n.prototype=Object.create(q.EventDispatcher.prototype);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t,n){return(i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a}).apply(null,arguments)}function u(e){var o="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(e))return o.get(e);o.set(e,n)}function n(){return i(e,arguments,a(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),r(n,e)})(e)}var l={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n'};var h=function(r){var e,t;function n(e){var t;if("production"===process.env.NODE_ENV)t=r.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/master/src/error/errors.md#"+e+" for more information.")||this;else{for(var n=arguments.length,o=new Array(1<n?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=r.call(this,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o,a=t[0],r=[];for(o=1;o<t.length;o+=1)r.push(t[o]);return r.forEach(function(e){a=a.replace(/%[a-z]/,e)}),a}.apply(void 0,[l[e]].concat(o)))||this}return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}return t=r,(e=n).prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t,n}(u(Error));function o(e){return Math.round(255*e)}function d(e,t,n){return o(e)+","+o(t)+","+o(n)}function p(e,t,n,o){if(void 0===o&&(o=d),0===t)return o(n,n,n);var a=e%360/60,r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(a%2-1)),s=0,c=0,u=0;0<=a&&a<1?(s=r,c=i):1<=a&&a<2?(s=i,c=r):2<=a&&a<3?(c=r,u=i):3<=a&&a<4?(c=i,u=r):4<=a&&a<5?(s=i,u=r):5<=a&&a<6&&(s=r,u=i);var l=n-r/2;return o(s+l,c+l,u+l)}var f={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var m=/^#[a-fA-F0-9]{6}$/,g=/^#[a-fA-F0-9]{8}$/,b=/^#[a-fA-F0-9]{3}$/,v=/^#[a-fA-F0-9]{4}$/,y=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,w=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,E=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,O=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;function k(e){if("string"!=typeof e)throw new h(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return f[t]?"#"+f[t]:e}(e);if(t.match(m))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(g)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(b))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(v)){var o=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:o}}var a=y.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var r=w.exec(t);if(r)return{red:parseInt(""+r[1],10),green:parseInt(""+r[2],10),blue:parseInt(""+r[3],10),alpha:parseFloat(""+r[4])};var i=E.exec(t);if(i){var s="rgb("+p(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",c=y.exec(s);if(!c)throw new h(4,t,s);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var u=O.exec(t);if(u){var l="rgb("+p(parseInt(""+u[1],10),parseInt(""+u[2],10)/100,parseInt(""+u[3],10)/100)+")",d=y.exec(l);if(!d)throw new h(4,t,l);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10),alpha:parseFloat(""+u[4])}}throw new h(5)}var S=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function _(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function x(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return S("#"+_(e)+_(t)+_(n));if("object"==typeof e&&void 0===t&&void 0===n)return S("#"+_(e.red)+_(e.green)+_(e.blue));throw new h(6)}function C(e){return function t(n,o,a){return function(){var e=a.concat(Array.prototype.slice.call(arguments));return e.length>=o?n.apply(this,e):t(n,o,e)}}(e,e.length,[])}function j(e,t){if("transparent"===t)return t;var n,o,a,r=k(t),i="number"==typeof r.alpha?r.alpha:1;return function(e,t,n,o){if("string"==typeof e&&"number"==typeof t){var a=k(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof o)return 1<=o?x(e,t,n):"rgba("+e+","+t+","+n+","+o+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===o)return 1<=e.alpha?x(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new h(7)}(s({},r,{alpha:(n=0,o=1,a=(100*i+100*parseFloat(e))/100,Math.max(n,Math.min(o,a)))}))}var P=C(j);"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function R(e,t){return e(t={exports:{}},t.exports),t.exports}var L,M=R(function(e,t){var n=function(){this._tweens={},this._tweensAddedDuringUpdate={}};n.prototype={getAll:function(){return Object.keys(this._tweens).map(function(e){return this._tweens[e]}.bind(this))},removeAll:function(){this._tweens={}},add:function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},remove:function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},update:function(e,t){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(e=void 0!==e?e:s.now();0<n.length;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var a=this._tweens[n[o]];a&&!1===a.update(e)&&(a._isPlaying=!1,t||delete this._tweens[n[o]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var o,s=new n;s.Group=n,s._nextId=0,s.nextId=function(){return s._nextId++},"undefined"==typeof window&&"undefined"!=typeof process&&process.hrtime?s.now=function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?s.now=window.performance.now.bind(window.performance):void 0!==Date.now?s.now=Date.now:s.now=function(){return(new Date).getTime()},s.Tween=function(e,t){this._object=e,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=s.Easing.Linear.None,this._interpolationFunction=s.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||s,this._id=s.nextId()},s.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(e,t){return this._valuesEnd=e,void 0!==t&&(this._duration=t),this},start:function(e){for(var t in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==e?"string"==typeof e?s.now()+parseFloat(e):e:s.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(0===this._valuesEnd[t].length)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}void 0!==this._object[t]&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array==!1&&(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying&&(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens()),this},end:function(){return this.update(this._startTime+this._duration),this},stopChainedTweens:function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop()},group:function(e){return this._group=e,this},delay:function(e){return this._delayTime=e,this},repeat:function(e){return this._repeat=e,this},repeatDelay:function(e){return this._repeatDelayTime=e,this},yoyo:function(e){return this._yoyo=e,this},easing:function(e){return this._easingFunction=e,this},interpolation:function(e){return this._interpolationFunction=e,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(e){return this._onStartCallback=e,this},onUpdate:function(e){return this._onUpdateCallback=e,this},onComplete:function(e){return this._onCompleteCallback=e,this},onStop:function(e){return this._onStopCallback=e,this},update:function(e){var t,n,o;if(e<this._startTime)return!0;for(t in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(e-this._startTime)/this._duration,n=0===this._duration||1<n?1:n,o=this._easingFunction(n),this._valuesEnd)if(void 0!==this._valuesStart[t]){var a=this._valuesStart[t]||0,r=this._valuesEnd[t];r instanceof Array?this._object[t]=this._interpolationFunction(r,o):("string"==typeof r&&(r="+"===r.charAt(0)||"-"===r.charAt(0)?a+parseFloat(r):parseFloat(r)),"number"==typeof r&&(this._object[t]=a+(r-a)*o))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object),1!==n)return!0;if(0<this._repeat){for(t in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[t]&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo){var i=this._valuesStartRepeat[t];this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=i}this._valuesStart[t]=this._valuesStartRepeat[t]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,c=this._chainedTweens.length;s<c;s++)this._chainedTweens[s].start(this._startTime+this._duration);return!1}},s.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){return e*e*(2.70158*e-1.70158)},Out:function(e){return--e*e*(2.70158*e+1.70158)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-s.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*s.Easing.Bounce.In(2*e):.5*s.Easing.Bounce.Out(2*e-1)+.5}}},s.Interpolation={Linear:function(e,t){var n=e.length-1,o=n*t,a=Math.floor(o),r=s.Interpolation.Utils.Linear;return t<0?r(e[0],e[1],o):1<t?r(e[n],e[n-1],n-o):r(e[a],e[n<a+1?n:a+1],o-a)},Bezier:function(e,t){for(var n=0,o=e.length-1,a=Math.pow,r=s.Interpolation.Utils.Bernstein,i=0;i<=o;i++)n+=a(1-t,o-i)*a(t,i)*e[i]*r(o,i);return n},CatmullRom:function(e,t){var n=e.length-1,o=n*t,a=Math.floor(o),r=s.Interpolation.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(a=Math.floor(o=n*(1+t))),r(e[(a-1+n)%n],e[a],e[(a+1)%n],e[(a+2)%n],o-a)):t<0?e[0]-(r(e[0],e[0],e[1],e[1],-o)-e[0]):1<t?e[n]-(r(e[n],e[n],e[n-1],e[n-1],o-n)-e[n]):r(e[a?a-1:0],e[a],e[n<a+1?n:a+1],e[n<a+2?n:a+2],o-a)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=s.Interpolation.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(o=[1],function(e){var t=1;if(o[e])return o[e];for(var n=e;1<n;n--)t*=n;return o[e]=t}),CatmullRom:function(e,t,n,o,a){var r=.5*(n-e),i=.5*(o-t),s=a*a;return(2*t-2*n+r+i)*(a*s)+(-3*t+3*n-2*r-i)*s+r*a+t}}},e.exports=s}),I=R(function(e,t){e.exports=function(n){function o(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var a={};return o.m=n,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,n){var o,a,r;a=[e,t],void 0!==(r="function"==typeof(o=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return t instanceof Function?t:"string"==typeof t?function(e){return e[t]}:function(e){return t}},e.exports=t.default})?o.apply(t,a):o)&&(e.exports=r)}])}),D=T(I),V=(I.accessorFn,R(function(e,t){"undefined"!=typeof self&&self,e.exports=function(n){var o={};function a(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=n,a.c=o,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,n){var o,a,r,i;i=function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.stateInit,o=void 0===t?function(){return{}}:t,n=e.props,a=void 0===n?{}:n,r=e.methods,c=void 0===r?{}:r,i=e.aliases,u=void 0===i?{}:i,s=e.init,l=void 0===s?function(){}:s,d=e.update,h=void 0===d?function(){}:d,p=Object.keys(a).map(function(e){return new g(e,a[e])});return function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=Object.assign({},o instanceof Function?o(t):o,{initialised:!1});function i(e){return n(e,t),s(),i}var n=function(e,t){l.call(i,e,r,t),r.initialised=!0},s=(0,f.default)(function(){r.initialised&&h.call(i,r)},1);return p.forEach(function(e){i[e.name]=function(n){var o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(e,t){};return function(e){var t=r[n];return arguments.length?(r[n]=e,a.call(i,e,r,t),o&&s(),i):t}}(e.name,e.triggerUpdate,e.onChange)}),Object.keys(c).forEach(function(a){i[a]=function(){for(var e,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=c[a]).call.apply(e,[i,r].concat(n))}}),Object.entries(u).forEach(function(e){var t=m(e,2),n=t[0],o=t[1];return i[n]=i[o]}),i.resetProps=function(){return p.forEach(function(e){i[e.name](e.defaultVal)}),i},i.resetProps(),r._rerender=s,i}};var o,f=(o=n)&&o.__esModule?o:{default:o},m=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,a=!1,r=void 0;try{for(var i,s=e[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{!o&&s.return&&s.return()}finally{if(a)throw r}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function e(t,n){var o=n.default,a=void 0===o?null:o,r=n.triggerUpdate,i=void 0===r||r,s=n.onChange,c=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=a,this.triggerUpdate=i,this.onChange=c};e.exports=t.default},a=[e,t,n(1)],void 0===(r="function"==typeof(o=i)?o.apply(t,a):o)||(e.exports=r)},function(e,t){e.exports=function(t,n,o){var a,r,i,s,c;function u(){var e=Date.now()-s;e<n&&0<=e?a=setTimeout(u,n-e):(a=null,o||(c=t.apply(i,r),i=r=null))}null==n&&(n=100);var e=function(){i=this,r=arguments,s=Date.now();var e=o&&!a;return a||(a=setTimeout(u,n)),e&&(c=t.apply(i,r),i=r=null),c};return e.clear=function(){a&&(clearTimeout(a),a=null)},e.flush=function(){a&&(c=t.apply(i,r),i=r=null,clearTimeout(a),a=null)},e}}])})),A=T(V),F=(V.Kapsule,window.THREE?window.THREE:{WebGLRenderer:e.WebGLRenderer,Scene:e.Scene,PerspectiveCamera:e.PerspectiveCamera,Raycaster:e.Raycaster,Vector2:e.Vector2,Vector3:e.Vector3,Color:e.Color,EventDispatcher:e.EventDispatcher,MOUSE:e.MOUSE,Quaternion:e.Quaternion,Spherical:e.Spherical}),N=function(B){function e(e,t){var n,o,a,r,i;this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new B.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:B.MOUSE.LEFT,ZOOM:B.MOUSE.MIDDLE,PAN:B.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),h=d.NONE},this.update=(n=new B.Vector3,o=(new B.Quaternion).setFromUnitVectors(e.up,new B.Vector3(0,1,0)),a=o.clone().inverse(),r=new B.Vector3,i=new B.Quaternion,function(){var e=s.object.position;return n.copy(e).sub(s.target),n.applyQuaternion(o),f.setFromVector3(n),s.autoRotate&&h===d.NONE&&P(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=g,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(b),n.setFromSpherical(f),n.applyQuaternion(a),e.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor):m.set(0,0,0),g=1,b.set(0,0,0),!(!(v||r.distanceToSquared(s.object.position)>p||8*(1-i.dot(s.object.quaternion))>p)||(s.dispatchEvent(c),r.copy(s.object.position),i.copy(s.object.quaternion),v=!1))}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",Q,!1),s.domElement.removeEventListener("mousedown",N,!1),s.domElement.removeEventListener("wheel",H,!1),s.domElement.removeEventListener("touchstart",Z,!1),s.domElement.removeEventListener("touchend",q,!1),s.domElement.removeEventListener("touchmove",X,!1),document.removeEventListener("mousemove",U,!1),document.removeEventListener("mouseup",z,!1),window.removeEventListener("keydown",Y,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},d={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},h=d.NONE,p=1e-6,f=new B.Spherical,m=new B.Spherical,g=1,b=new B.Vector3,v=!1,y=new B.Vector2,w=new B.Vector2,E=new B.Vector2,O=new B.Vector2,k=new B.Vector2,S=new B.Vector2,_=new B.Vector2,x=new B.Vector2,C=new B.Vector2;function j(){return Math.pow(.95,s.zoomSpeed)}function P(e){m.theta-=e}function T(e){m.phi-=e}var R,L,M,I=(R=new B.Vector3,function(e,t){R.setFromMatrixColumn(t,0),R.multiplyScalar(-e),b.add(R)}),D=(L=new B.Vector3,function(e,t){L.setFromMatrixColumn(t,1),L.multiplyScalar(e),b.add(L)}),V=(M=new B.Vector3,function(e,t){var n=s.domElement===document?s.domElement.body:s.domElement;if(s.object instanceof B.PerspectiveCamera){var o=s.object.position;M.copy(o).sub(s.target);var a=M.length();a*=Math.tan(s.object.fov/2*Math.PI/180),I(2*e*a/n.clientHeight,s.object.matrix),D(2*t*a/n.clientHeight,s.object.matrix)}else s.object instanceof B.OrthographicCamera?(I(e*(s.object.right-s.object.left)/s.object.zoom/n.clientWidth,s.object.matrix),D(t*(s.object.top-s.object.bottom)/s.object.zoom/n.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)});function A(e){s.object instanceof B.PerspectiveCamera?g/=e:s.object instanceof B.OrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(e){s.object instanceof B.PerspectiveCamera?g*=e:s.object instanceof B.OrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function N(e){if(!1!==s.enabled){if(e.preventDefault(),e.button===s.mouseButtons.ORBIT){if(!1===s.enableRotate)return;o=e,y.set(o.clientX,o.clientY),h=d.ROTATE}else if(e.button===s.mouseButtons.ZOOM){if(!1===s.enableZoom)return;n=e,_.set(n.clientX,n.clientY),h=d.DOLLY}else if(e.button===s.mouseButtons.PAN){if(!1===s.enablePan)return;t=e,O.set(t.clientX,t.clientY),h=d.PAN}var t,n,o;h!==d.NONE&&(document.addEventListener("mousemove",U,!1),document.addEventListener("mouseup",z,!1),s.dispatchEvent(u))}}function U(e){var t,n;if(!1!==s.enabled)if(e.preventDefault(),h===d.ROTATE){if(!1===s.enableRotate)return;!function(e){w.set(e.clientX,e.clientY),E.subVectors(w,y);var t=s.domElement===document?s.domElement.body:s.domElement;P(2*Math.PI*E.x/t.clientWidth*s.rotateSpeed),T(2*Math.PI*E.y/t.clientHeight*s.rotateSpeed),y.copy(w),s.update()}(e)}else if(h===d.DOLLY){if(!1===s.enableZoom)return;n=e,x.set(n.clientX,n.clientY),C.subVectors(x,_),0<C.y?A(j()):C.y<0&&F(j()),_.copy(x),s.update()}else if(h===d.PAN){if(!1===s.enablePan)return;t=e,k.set(t.clientX,t.clientY),S.subVectors(k,O),V(S.x,S.y),O.copy(k),s.update()}}function z(e){!1!==s.enabled&&(document.removeEventListener("mousemove",U,!1),document.removeEventListener("mouseup",z,!1),s.dispatchEvent(l),h=d.NONE)}function H(e){var t;!1===s.enabled||!1===s.enableZoom||h!==d.NONE&&h!==d.ROTATE||(e.preventDefault(),e.stopPropagation(),(t=e).deltaY<0?F(j()):0<t.deltaY&&A(j()),s.update(),s.dispatchEvent(u),s.dispatchEvent(l))}function Y(e){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(e){switch(e.keyCode){case s.keys.UP:V(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:V(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:V(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:V(-s.keyPanSpeed,0),s.update()}}(e)}function Z(e){if(!1!==s.enabled){switch(e.touches.length){case 1:if(!1===s.enableRotate)return;i=e,y.set(i.touches[0].pageX,i.touches[0].pageY),h=d.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom)return;o=(n=e).touches[0].pageX-n.touches[1].pageX,a=n.touches[0].pageY-n.touches[1].pageY,r=Math.sqrt(o*o+a*a),_.set(0,r),h=d.TOUCH_DOLLY;break;case 3:if(!1===s.enablePan)return;t=e,O.set(t.touches[0].pageX,t.touches[0].pageY),h=d.TOUCH_PAN;break;default:h=d.NONE}var t,n,o,a,r,i;h!==d.NONE&&s.dispatchEvent(u)}}function X(e){var t,n,o,a,r;if(!1!==s.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===s.enableRotate)return;if(h!==d.TOUCH_ROTATE)return;!function(e){w.set(e.touches[0].pageX,e.touches[0].pageY),E.subVectors(w,y);var t=s.domElement===document?s.domElement.body:s.domElement;P(2*Math.PI*E.x/t.clientWidth*s.rotateSpeed),T(2*Math.PI*E.y/t.clientHeight*s.rotateSpeed),y.copy(w),s.update()}(e);break;case 2:if(!1===s.enableZoom)return;if(h!==d.TOUCH_DOLLY)return;o=(n=e).touches[0].pageX-n.touches[1].pageX,a=n.touches[0].pageY-n.touches[1].pageY,r=Math.sqrt(o*o+a*a),x.set(0,r),C.subVectors(x,_),0<C.y?F(j()):C.y<0&&A(j()),_.copy(x),s.update();break;case 3:if(!1===s.enablePan)return;if(h!==d.TOUCH_PAN)return;t=e,k.set(t.touches[0].pageX,t.touches[0].pageY),S.subVectors(k,O),V(S.x,S.y),O.copy(k),s.update();break;default:h=d.NONE}}function q(e){!1!==s.enabled&&(s.dispatchEvent(l),h=d.NONE)}function Q(e){e.preventDefault()}s.domElement.addEventListener("contextmenu",Q,!1),s.domElement.addEventListener("mousedown",N,!1),s.domElement.addEventListener("wheel",H,!1),s.domElement.addEventListener("touchstart",Z,!1),s.domElement.addEventListener("touchend",q,!1),s.domElement.addEventListener("touchmove",X,!1),window.addEventListener("keydown",Y,!1),this.update()}return(e.prototype=Object.create(B.EventDispatcher.prototype)).constructor=e,Object.defineProperties(e.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.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}}),e}(F),U=((L=F).FlyControls=function(e,t,n){this.object=e,n=n||{},this.domElement=void 0!==t?t:document,t&&this.domElement.setAttribute("tabindex",-1),this.movementSpeed=void 0===n.movementSpeed?1:n.movementSpeed,this.rollSpeed=void 0===n.rollSpeed?.005:n.rollSpeed,this.dragToLook=!0,this.autoForward=!1,this.tmpQuaternion=new L.Quaternion,this.mouseStatus=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new L.Vector3(0,0,0),this.rotationVector=new L.Vector3(0,0,0);var a=Date.now();function o(e,t){return function(){t.apply(e,arguments)}}this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)},this.keydown=function(e){if(!e.altKey){switch(e.keyCode){case 16:this.movementSpeedMultiplier=.1;break;case 87:this.moveState.forward=1;break;case 83:this.moveState.back=1;break;case 65:this.moveState.left=1;break;case 68:this.moveState.right=1;break;case 82:this.moveState.up=1;break;case 70:this.moveState.down=1;break;case 38:this.moveState.pitchUp=1;break;case 40:this.moveState.pitchDown=1;break;case 37:this.moveState.yawLeft=1;break;case 39:this.moveState.yawRight=1;break;case 81:this.moveState.rollLeft=1;break;case 69:this.moveState.rollRight=1}-1<[38,40,37,39].indexOf(e.keyCode)&&e.preventDefault(),this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.keyCode){case 16:this.movementSpeedMultiplier=1;break;case 87:this.moveState.forward=0;break;case 83:this.moveState.back=0;break;case 65:this.moveState.left=0;break;case 68:this.moveState.right=0;break;case 82:this.moveState.up=0;break;case 70:this.moveState.down=0;break;case 38:this.moveState.pitchUp=0;break;case 40:this.moveState.pitchDown=0;break;case 37:this.moveState.yawLeft=0;break;case 39:this.moveState.yawRight=0;break;case 81:this.moveState.rollLeft=0;break;case 69:this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.mousedown=function(e){if(this.domElement!==document&&this.domElement.focus(),e.preventDefault(),e.stopPropagation(),this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.mousemove=function(e){if(!this.dragToLook||0<this.mouseStatus){var t=this.getContainerDimensions(),n=t.size[0]/2,o=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-o)/o,this.updateRotationVector()}},this.mouseout=function(e){e.preventDefault(),e.stopPropagation(),this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.updateRotationVector(),this.updateMovementVector()},this.mouseup=function(e){if(e.preventDefault(),e.stopPropagation(),this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){var t=Date.now(),n=(e=(t-a)/10)*this.movementSpeed,o=e*this.rollSpeed;this.object.translateX(this.moveVector.x*n),this.object.translateY(this.moveVector.y*n),this.object.translateZ(this.moveVector.z*n),this.tmpQuaternion.set(this.rotationVector.x*o,this.rotationVector.y*o,this.rotationVector.z*o,1).normalize(),this.object.quaternion.multiply(this.tmpQuaternion),this.object.rotation.setFromQuaternion(this.object.quaternion,this.object.rotation.order),a=t},this.updateMovementVector=function(){var e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.domElement.addEventListener("contextmenu",function(e){e.preventDefault()},!1),this.domElement.addEventListener("mousemove",o(this,this.mousemove),!1),this.domElement.addEventListener("mousedown",o(this,this.mousedown),!1),this.domElement.addEventListener("mouseup",o(this,this.mouseup),!1),this.domElement.addEventListener("mouseout",o(this,this.mouseout),!1),this.domElement.addEventListener("keydown",o(this,this.keydown),!1),this.domElement.addEventListener("keyup",o(this,this.keyup),!1),this.updateMovementVector(),this.updateRotationVector()},F.FlyControls);return A({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011",onChange:function(e,t){if(t.renderer){var n=k(e).alpha;void 0===n&&(n=1),t.renderer.setClearColor(new F.Color(P(1,e)),n)}},triggerUpdate:!1},showNavInfo:{default:!0},objects:{default:[],onChange:function(e,t){(t.prevObjs||[]).forEach(function(e){return t.scene.remove(e)}),(t.prevObjs=e).forEach(function(e){return t.scene.add(e)})},triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(),e.renderer.render(e.scene,e.camera),e.enablePointerInteraction){var t=null;if(!e.controlsDragging){var n=new F.Raycaster;n.linePrecision=e.lineHoverPrecision,n.setFromCamera(e.mousePos,e.camera);var o=n.intersectObjects(e.objects,!0).map(function(e){return e.object}).sort(e.hoverOrderComparator);t=!e.controlsDragging&&o.length?o[0]:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&D(e.tooltipContent)(t)||"",e.hoverObj=t)}M.update()}return this},cameraPosition:function(t,e,n,o){var a=t.camera;if(e&&t.initialised){var r=e,i=n||{x:0,y:0,z:0};if(o){var s=Object.assign({},a.position),c=d();new M.Tween(s).to(r,o).easing(M.Easing.Quadratic.Out).onUpdate(u).start(),new M.Tween(c).to(i,o/3).easing(M.Easing.Quadratic.Out).onUpdate(l).start()}else u(r),l(i);return this}return Object.assign({},a.position,{lookAt:d()});function u(e){var t=e.x,n=e.y,o=e.z;void 0!==t&&(a.position.x=t),void 0!==n&&(a.position.y=n),void 0!==o&&(a.position.z=o)}function l(e){t.controls.target=new F.Vector3(e.x,e.y,e.z)}function d(){return Object.assign(new F.Vector3(0,0,-1e3).applyQuaternion(a.quaternion).add(a.position))}},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new F.Scene,camera:new F.PerspectiveCamera}},init:function(e,s,t){var n=t.controlType,o=void 0===n?"trackball":n,a=t.rendererConfig,r=void 0===a?{}:a;e.innerHTML="",e.appendChild(s.container=document.createElement("div")),s.container.style.position="relative",s.container.appendChild(s.navInfo=document.createElement("div")),s.navInfo.className="scene-nav-info",s.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[o]||"",s.toolTipElem=document.createElement("div"),s.toolTipElem.classList.add("scene-tooltip"),s.container.appendChild(s.toolTipElem),s.mousePos=new F.Vector2,s.mousePos.x=-2,s.mousePos.y=-2,s.container.addEventListener("mousemove",function(e){if(s.enablePointerInteraction){var t=(o=s.container,a=o.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,i=window.pageYOffset||document.documentElement.scrollTop,{top:a.top+i,left:a.left+r}),n={x:e.pageX-t.left,y:e.pageY-t.top};s.mousePos.x=n.x/s.width*2-1,s.mousePos.y=-n.y/s.height*2+1,s.toolTipElem.style.top="".concat(n.y,"px"),s.toolTipElem.style.left="".concat(n.x,"px")}var o,a,r,i},!1),s.container.addEventListener("click",function(e){s.ignoreOneClick?s.ignoreOneClick=!1:s.hoverObj&&s.onClick(s.hoverObj)},!1),s.container.addEventListener("contextmenu",function(e){return!s.onRightClick||(e.preventDefault(),s.hoverObj&&s.onRightClick(s.hoverObj),!1)},!1),s.renderer=new F.WebGLRenderer(Object.assign({alpha:!0},r)),s.renderer.setPixelRatio(window.devicePixelRatio);var i=k(s.backgroundColor).alpha;void 0===i&&(i=1),s.renderer.setClearColor(new F.Color(P(1,s.backgroundColor)),i),s.container.appendChild(s.renderer.domElement),s.controls=new{trackball:c,orbit:N,fly:U}[o](s.camera,s.renderer.domElement),"fly"===o&&(s.controls.movementSpeed=2.5),"trackball"!==o&&"orbit"!==o||(s.controls.minDistance=.1,s.controls.maxDistance=5e4,s.controls.addEventListener("start",function(){return s.controlsEngaged=!0}),s.controls.addEventListener("change",function(){s.controlsEngaged&&(s.controlsDragging=!0,s.ignoreOneClick=!0)}),s.controls.addEventListener("end",function(){s.controlsEngaged=!1,s.controlsDragging=!1})),s.renderer.setSize(s.width,s.height),s.camera.position.z=1e3,s.camera.far=5e4,window.scene=s.scene},update:function(e){e.width&&e.height&&(e.container.style.width=e.width,e.container.style.height=e.height,e.renderer.setSize(e.width,e.height),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),e.navInfo.style.display=e.showNavInfo?null:"none"}})});

@@ -62,4 +62,4 @@ import { WebGLRenderer, Scene, PerspectiveCamera, Raycaster, Vector2, Vector3, Color, EventDispatcher, MOUSE, Quaternion, Spherical } from 'three';

default: window.innerWidth,
onChange: function onChange(width, state) {
isNaN(width) && (state.width = window.innerWidth);
onChange: function onChange(width, state, prevWidth) {
isNaN(width) && (state.width = prevWidth);
}

@@ -69,4 +69,4 @@ },

default: window.innerHeight,
onChange: function onChange(height, state) {
isNaN(height) && (state.height = window.innerHeight);
onChange: function onChange(height, state, prevHeight) {
isNaN(height) && (state.height = prevHeight);
}

@@ -73,0 +73,0 @@ },

{
"name": "three-render-objects",
"version": "1.4.2",
"version": "1.4.3",
"description": "Easy way to render ThreeJS objects with built-in interaction defaults",

@@ -43,4 +43,4 @@ "unpkg": "dist/three-render-objects.min.js",

"accessor-fn": "^1.2.2",
"kapsule": "^1.9.2",
"polished": "^2.3.3",
"kapsule": "^1.10.0",
"polished": "^3.0.3",
"three-fly-controls": "^1.1.0",

@@ -54,13 +54,13 @@ "three-orbit-controls": "^82.1.0",

"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.3.0",
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
"@babel/preset-env": "^7.3.1",
"postcss-nested": "^4.1.1",
"postcss-simple-vars": "^5.0.1",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-class-properties": "^7.3.4",
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
"@babel/preset-env": "^7.3.4",
"postcss-nested": "^4.1.2",
"postcss-simple-vars": "^5.0.2",
"rimraf": "^2.6.3",
"rollup": "^1.1.2",
"rollup": "^1.6.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^4.0.1",
"rollup-plugin-postcss": "^2.0.3",

@@ -67,0 +67,0 @@ "rollup-watch": "^4.3.1",

@@ -48,4 +48,4 @@ import {

props: {
width: { default: window.innerWidth, onChange(width, state) { isNaN(width) && (state.width = window.innerWidth) } },
height: { default: window.innerHeight, onChange(height, state) { isNaN(height) && (state.height = window.innerHeight) } },
width: { default: window.innerWidth, onChange(width, state, prevWidth) { isNaN(width) && (state.width = prevWidth) } },
height: { default: window.innerHeight, onChange(height, state, prevHeight) { isNaN(height) && (state.height = prevHeight) } },
backgroundColor: {

@@ -52,0 +52,0 @@ default: '#000011',

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc