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 0.1.6 to 0.2.0

yarn-error.log

61

dist/three-render-objects.common.js

@@ -6,4 +6,5 @@ 'use strict';

var three = require('three');
var ThreeTrackballControls = _interopDefault(require('three-trackballcontrols'));
var tinycolor = _interopDefault(require('tinycolor2'));
var ThreeTrackballControls = _interopDefault(require('three-trackballcontrols'));
var TweenLite = _interopDefault(require('gsap/TweenLite'));
var accessorFn = _interopDefault(require('accessor-fn'));

@@ -51,2 +52,3 @@ var Kapsule = _interopDefault(require('kapsule'));

Vector2: three.Vector2,
Vector3: three.Vector3,
Color: three.Color

@@ -121,2 +123,59 @@ };

},
cameraPosition: function cameraPosition(state, position, lookAt, transitionDuration) {
var camera = state.camera;
// Setter
if (position && state.initialised) {
var finalPos = position;
var finalLookAt = lookAt || { x: 0, y: 0, z: 0 };
if (!transitionDuration) {
// no animation
setCameraPos(finalPos);
setLookAt(finalLookAt);
} else {
var camPos = Object.assign({}, camera.position);
var camLookAt = getLookAt();
var tweenDuration = transitionDuration / 1000; // ms > s
TweenLite.to(camPos, tweenDuration, Object.assign({
onUpdate: function onUpdate() {
return setCameraPos(camPos);
}
}, finalPos));
// Face direction in 1/3rd of time
TweenLite.to(camLookAt, tweenDuration / 3, Object.assign({
onUpdate: function onUpdate() {
return setLookAt(camLookAt);
}
}, finalLookAt));
}
return this;
}
// Getter
return Object.assign({}, camera.position, { lookAt: getLookAt() });
//
function setCameraPos(pos) {
var x = pos.x,
y = pos.y,
z = pos.z;
if (x !== undefined) camera.position.x = x;
if (y !== undefined) camera.position.y = y;
if (z !== undefined) camera.position.z = z;
}
function setLookAt(lookAt) {
state.tbControls.target = new three$1.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));
}
},
renderer: function renderer(state) {

@@ -123,0 +182,0 @@ return state.renderer;

6

dist/three-render-objects.min.js

@@ -1,5 +0,5 @@

// Version 0.1.6 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.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 r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.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}\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}");"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function n(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 o,i=r(function(Y){!function(f){var h=/^\s+/,d=/\s+$/,r=0,a=f.round,p=f.min,g=f.max,e=f.random;function l(e,t){if(t=t||{},(e=e||"")instanceof l)return e;if(!(this instanceof l))return new l(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(h,"").replace(d,"").toLowerCase();var t,n=!1;if(k[e])e=k[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=D.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=D.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=D.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=D.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=D.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=D.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=D.hex8.exec(e))return{r:T(t[1]),g:T(t[2]),b:T(t[3]),a:N(t[4]),format:n?"name":"hex8"};if(t=D.hex6.exec(e))return{r:T(t[1]),g:T(t[2]),b:T(t[3]),format:n?"name":"hex"};if(t=D.hex4.exec(e))return{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),a:N(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=D.hex3.exec(e))return{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(z(e.r)&&z(e.g)&&z(e.b)?(c=e.r,u=e.g,l=e.b,t={r:255*j(c,255),g:255*j(u,255),b:255*j(l,255)},a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):z(e.h)&&z(e.s)&&z(e.v)?(r=P(e.s),o=P(e.v),t=function(e,t,n){e=6*j(e,360),t=j(t,100),n=j(n,100);var r=f.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),c=r%6;return{r:255*[n,a,i,i,s,n][c],g:255*[s,n,n,a,i,i][c],b:255*[i,i,s,n,n,a][c]}}(e.h,r,o),a=!0,s="hsv"):z(e.h)&&z(e.s)&&z(e.l)&&(r=P(e.s),i=P(e.l),t=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),1<n&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=j(e,360),t=j(t,100),n=j(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=a(c,s,e+1/3),o=a(c,s,e),i=a(c,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var c,u,l;return n=S(n),{ok:a,format:e.format||s,r:p(255,g(t.r,0)),g:p(255,g(t.g,0)),b:p(255,g(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=r++}function o(e,t,n){e=j(e,255),t=j(t,255),n=j(n,255);var r,o,i=g(e,t,n),a=p(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var c=i-a;switch(o=.5<s?c/(2-i-a):c/(i+a),i){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:o,l:s}}function i(e,t,n){e=j(e,255),t=j(t,255),n=j(n,255);var r,o,i=g(e,t,n),a=p(e,t,n),s=i,c=i-a;if(o=0===i?0:c/i,i==a)r=0;else{switch(i){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:o,v:s}}function t(e,t,n,r){var o=[L(a(e).toString(16)),L(a(t).toString(16)),L(a(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function s(e,t,n,r){return[L(H(r)),L(a(e).toString(16)),L(a(t).toString(16)),L(a(n).toString(16))].join("")}function n(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s-=t/100,n.s=R(n.s),l(n)}function c(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s+=t/100,n.s=R(n.s),l(n)}function u(e){return l(e).desaturate(100)}function m(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l+=t/100,n.l=R(n.l),l(n)}function b(e,t){t=0===t?0:t||10;var n=l(e).toRgb();return n.r=g(0,p(255,n.r-a(-t/100*255))),n.g=g(0,p(255,n.g-a(-t/100*255))),n.b=g(0,p(255,n.b-a(-t/100*255))),l(n)}function v(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l-=t/100,n.l=R(n.l),l(n)}function y(e,t){var n=l(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,l(n)}function w(e){var t=l(e).toHsl();return t.h=(t.h+180)%360,l(t)}function _(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+120)%360,s:t.s,l:t.l}),l({h:(n+240)%360,s:t.s,l:t.l})]}function x(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+90)%360,s:t.s,l:t.l}),l({h:(n+180)%360,s:t.s,l:t.l}),l({h:(n+270)%360,s:t.s,l:t.l})]}function E(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+72)%360,s:t.s,l:t.l}),l({h:(n+216)%360,s:t.s,l:t.l})]}function A(e,t,n){t=t||6,n=n||30;var r=l(e).toHsl(),o=360/n,i=[l(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(l(r));return i}function O(e,t){t=t||6;for(var n=l(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(l({h:r,s:o,v:i})),i=(i+s)%1;return a}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:f.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:f.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:f.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=S(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=i(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=o(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=o(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[L(a(e).toString(16)),L(a(t).toString(16)),L(a(n).toString(16)),L(H(r))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*j(this._r,255))+"%",g:a(100*j(this._g,255))+"%",b:a(100*j(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*j(this._r,255))+"%, "+a(100*j(this._g,255))+"%, "+a(100*j(this._b,255))+"%)":"rgba("+a(100*j(this._r,255))+"%, "+a(100*j(this._g,255))+"%, "+a(100*j(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[t(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+s(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=l(e);n="#"+s(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return l(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(E,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},l.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return l(e,t)},l.equals=function(e,t){return!(!e||!t)&&l(e).toRgbString()==l(t).toRgbString()},l.random=function(){return l.fromRatio({r:e(),g:e(),b:e()})},l.mix=function(e,t,n){n=0===n?0:n||50;var r=l(e).toRgb(),o=l(t).toRgb(),i=n/100;return l({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},
// Version 0.2.0 three-render-objects - https://github.com/vasturiano/three-render-objects
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("three")):"function"==typeof define&&define.amd?define(["three"],e):t.ThreeRenderObjects=e(t.THREE)}(this,function(t){"use strict";var e="default"in t?t.default:t;!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}(".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}\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 i,Z=window.THREE||e,n=i=function(t,e){var s=this,a={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4};this.object=t,this.domElement=void 0!==e?e: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 Z.Vector3;var i=new Z.Vector3,o=a.NONE,n=a.NONE,r=new Z.Vector3,l=new Z.Vector2,h=new Z.Vector2,c=new Z.Vector3,u=0,f=new Z.Vector2,p=new Z.Vector2,d=0,_=0,m=new Z.Vector2,g=new Z.Vector2;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone();var v={type:"change"},b={type:"start"},y={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 t=this.domElement.getBoundingClientRect(),e=this.domElement.ownerDocument.documentElement;this.screen.left=t.left+window.pageXOffset-e.clientLeft,this.screen.top=t.top+window.pageYOffset-e.clientTop,this.screen.width=t.width,this.screen.height=t.height}},this.handleEvent=function(t){"function"==typeof this[t.type]&&this[t.type](t)};var w,T,x,A,P,k,E,S,C,O,R,j,L=(w=new Z.Vector2,function(t,e){return w.set((t-s.screen.left)/s.screen.width,(e-s.screen.top)/s.screen.height),w}),D=(T=new Z.Vector2,function(t,e){return T.set((t-.5*s.screen.width-s.screen.left)/(.5*s.screen.width),(s.screen.height+2*(s.screen.top-e))/s.screen.width),T});function F(t,e){return Array.isArray(t)?-1!==t.indexOf(e):t===e}function N(t){!1!==s.enabled&&(window.removeEventListener("keydown",N),(n=o)===a.NONE&&(F(s.keys[a.ROTATE],t.keyCode)&&!s.noRotate?o=a.ROTATE:F(s.keys[a.ZOOM],t.keyCode)&&!s.noZoom?o=a.ZOOM:F(s.keys[a.PAN],t.keyCode)&&!s.noPan&&(o=a.PAN)))}function z(t){!1!==s.enabled&&(o=n,window.addEventListener("keydown",N,!1))}function I(t){!1!==s.enabled&&(t.preventDefault(),t.stopPropagation(),o===a.NONE&&(o=t.button),o!==a.ROTATE||s.noRotate?o!==a.ZOOM||s.noZoom?o!==a.PAN||s.noPan||(m.copy(L(t.pageX,t.pageY)),g.copy(m)):(f.copy(L(t.pageX,t.pageY)),p.copy(f)):(h.copy(D(t.pageX,t.pageY)),l.copy(h)),document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",M,!1),s.dispatchEvent(b))}function H(t){!1!==s.enabled&&(t.preventDefault(),t.stopPropagation(),o!==a.ROTATE||s.noRotate?o!==a.ZOOM||s.noZoom?o!==a.PAN||s.noPan||g.copy(L(t.pageX,t.pageY)):p.copy(L(t.pageX,t.pageY)):(l.copy(h),h.copy(D(t.pageX,t.pageY))))}function M(t){!1!==s.enabled&&(t.preventDefault(),t.stopPropagation(),o=a.NONE,document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",M),s.dispatchEvent(y))}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.stopPropagation(),t.deltaMode){case 2:f.y-=.025*t.deltaY;break;case 1:f.y-=.01*t.deltaY;break;default:f.y-=25e-5*t.deltaY}s.dispatchEvent(b),s.dispatchEvent(y)}}function V(t){if(!1!==s.enabled){switch(t.touches.length){case 1:o=a.TOUCH_ROTATE,h.copy(D(t.touches[0].pageX,t.touches[0].pageY)),l.copy(h);break;default:o=a.TOUCH_ZOOM_PAN;var e=t.touches[0].pageX-t.touches[1].pageX,i=t.touches[0].pageY-t.touches[1].pageY;_=d=Math.sqrt(e*e+i*i);var n=(t.touches[0].pageX+t.touches[1].pageX)/2,r=(t.touches[0].pageY+t.touches[1].pageY)/2;m.copy(L(n,r)),g.copy(m)}s.dispatchEvent(b)}}function q(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:l.copy(h),h.copy(D(t.touches[0].pageX,t.touches[0].pageY));break;default:var e=t.touches[0].pageX-t.touches[1].pageX,i=t.touches[0].pageY-t.touches[1].pageY;_=Math.sqrt(e*e+i*i);var n=(t.touches[0].pageX+t.touches[1].pageX)/2,r=(t.touches[0].pageY+t.touches[1].pageY)/2;g.copy(L(n,r))}}function Y(t){if(!1!==s.enabled){switch(t.touches.length){case 0:o=a.NONE;break;case 1:o=a.TOUCH_ROTATE,h.copy(D(t.touches[0].pageX,t.touches[0].pageY)),l.copy(h)}s.dispatchEvent(y)}}function X(t){!1!==s.enabled&&t.preventDefault()}this.rotateCamera=(A=new Z.Vector3,P=new Z.Quaternion,k=new Z.Vector3,E=new Z.Vector3,S=new Z.Vector3,C=new Z.Vector3,function(){C.set(h.x-l.x,h.y-l.y,0),(x=C.length())?(r.copy(s.object.position).sub(s.target),k.copy(r).normalize(),E.copy(s.object.up).normalize(),S.crossVectors(E,k).normalize(),E.setLength(h.y-l.y),S.setLength(h.x-l.x),C.copy(E.add(S)),A.crossVectors(C,r).normalize(),x*=s.rotateSpeed,P.setFromAxisAngle(A,x),r.applyQuaternion(P),s.object.up.applyQuaternion(P),c.copy(A),u=x):!s.staticMoving&&u&&(u*=Math.sqrt(1-s.dynamicDampingFactor),r.copy(s.object.position).sub(s.target),P.setFromAxisAngle(c,u),r.applyQuaternion(P),s.object.up.applyQuaternion(P)),l.copy(h)}),this.zoomCamera=function(){var t;o===a.TOUCH_ZOOM_PAN?(t=d/_,d=_,r.multiplyScalar(t)):(1!==(t=1+(p.y-f.y)*s.zoomSpeed)&&0<t&&r.multiplyScalar(t),s.staticMoving?f.copy(p):f.y+=(p.y-f.y)*this.dynamicDampingFactor)},this.panCamera=(O=new Z.Vector2,R=new Z.Vector3,j=new Z.Vector3,function(){O.copy(g).sub(m),O.lengthSq()&&(O.multiplyScalar(r.length()*s.panSpeed),j.copy(r).cross(s.object.up).setLength(O.x),j.add(R.copy(s.object.up).setLength(O.y)),s.object.position.add(j),s.target.add(j),s.staticMoving?m.copy(g):m.add(O.subVectors(g,m).multiplyScalar(s.dynamicDampingFactor)))}),this.checkDistances=function(){s.noZoom&&s.noPan||(r.lengthSq()>s.maxDistance*s.maxDistance&&(s.object.position.addVectors(s.target,r.setLength(s.maxDistance)),f.copy(p)),r.lengthSq()<s.minDistance*s.minDistance&&(s.object.position.addVectors(s.target,r.setLength(s.minDistance)),f.copy(p)))},this.update=function(){r.subVectors(s.object.position,s.target),s.noRotate||s.rotateCamera(),s.noZoom||s.zoomCamera(),s.noPan||s.panCamera(),s.object.position.addVectors(s.target,r),s.checkDistances(),s.object.lookAt(s.target),1e-6<i.distanceToSquared(s.object.position)&&(s.dispatchEvent(v),i.copy(s.object.position))},this.reset=function(){o=a.NONE,n=a.NONE,s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.up.copy(s.up0),r.subVectors(s.object.position,s.target),s.object.lookAt(s.target),s.dispatchEvent(v),i.copy(s.object.position)},this.dispose=function(){this.domElement.removeEventListener("contextmenu",X,!1),this.domElement.removeEventListener("mousedown",I,!1),this.domElement.removeEventListener("wheel",U,!1),this.domElement.removeEventListener("touchstart",V,!1),this.domElement.removeEventListener("touchend",Y,!1),this.domElement.removeEventListener("touchmove",q,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",M,!1),window.removeEventListener("keydown",N,!1),window.removeEventListener("keyup",z,!1)},this.domElement.addEventListener("contextmenu",X,!1),this.domElement.addEventListener("mousedown",I,!1),this.domElement.addEventListener("wheel",U,!1),this.domElement.addEventListener("touchstart",V,!1),this.domElement.addEventListener("touchend",Y,!1),this.domElement.addEventListener("touchmove",q,!1),window.addEventListener("keydown",N,!1),window.addEventListener("keyup",z,!1),this.handleResize(),this.update()};i.prototype=Object.create(Z.EventDispatcher.prototype);var r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t,e){return t(e={exports:{}},e.exports),e.exports}var o=a(function(U){!function(u){var f=/^\s+/,p=/\s+$/,n=0,a=u.round,d=u.min,_=u.max,t=u.random;function c(t,e){if(e=e||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,e);var i=function(t){var e={r:0,g:0,b:0},i=1,n=null,r=null,s=null,a=!1,o=!1;"string"==typeof t&&(t=function(t){t=t.replace(f,"").replace(p,"").toLowerCase();var e,i=!1;if(k[t])t=k[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=H.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=H.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=H.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=H.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=H.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=H.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=H.hex8.exec(t))return{r:R(e[1]),g:R(e[2]),b:R(e[3]),a:F(e[4]),format:i?"name":"hex8"};if(e=H.hex6.exec(t))return{r:R(e[1]),g:R(e[2]),b:R(e[3]),format:i?"name":"hex"};if(e=H.hex4.exec(t))return{r:R(e[1]+""+e[1]),g:R(e[2]+""+e[2]),b:R(e[3]+""+e[3]),a:F(e[4]+""+e[4]),format:i?"name":"hex8"};if(e=H.hex3.exec(t))return{r:R(e[1]+""+e[1]),g:R(e[2]+""+e[2]),b:R(e[3]+""+e[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(M(t.r)&&M(t.g)&&M(t.b)?(l=t.r,h=t.g,c=t.b,e={r:255*C(l,255),g:255*C(h,255),b:255*C(c,255)},a=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):M(t.h)&&M(t.s)&&M(t.v)?(n=L(t.s),r=L(t.v),e=function(t,e,i){t=6*C(t,360),e=C(e,100),i=C(i,100);var n=u.floor(t),r=t-n,s=i*(1-e),a=i*(1-r*e),o=i*(1-(1-r)*e),l=n%6;return{r:255*[i,a,s,s,o,i][l],g:255*[o,i,i,a,s,s][l],b:255*[s,s,o,i,i,a][l]}}(t.h,n,r),a=!0,o="hsv"):M(t.h)&&M(t.s)&&M(t.l)&&(n=L(t.s),s=L(t.l),e=function(t,e,i){var n,r,s;function a(t,e,i){return i<0&&(i+=1),1<i&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}if(t=C(t,360),e=C(e,100),i=C(i,100),0===e)n=r=s=i;else{var o=i<.5?i*(1+e):i+e-i*e,l=2*i-o;n=a(l,o,t+1/3),r=a(l,o,t),s=a(l,o,t-1/3)}return{r:255*n,g:255*r,b:255*s}}(t.h,n,s),a=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a));var l,h,c;return i=S(i),{ok:a,format:t.format||o,r:d(255,_(e.r,0)),g:d(255,_(e.g,0)),b:d(255,_(e.b,0)),a:i}}(t);this._originalInput=t,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=a(100*this._a)/100,this._format=e.format||i.format,this._gradientType=e.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=i.ok,this._tc_id=n++}function r(t,e,i){t=C(t,255),e=C(e,255),i=C(i,255);var n,r,s=_(t,e,i),a=d(t,e,i),o=(s+a)/2;if(s==a)n=r=0;else{var l=s-a;switch(r=.5<o?l/(2-s-a):l/(s+a),s){case t:n=(e-i)/l+(e<i?6:0);break;case e:n=(i-t)/l+2;break;case i:n=(t-e)/l+4}n/=6}return{h:n,s:r,l:o}}function s(t,e,i){t=C(t,255),e=C(e,255),i=C(i,255);var n,r,s=_(t,e,i),a=d(t,e,i),o=s,l=s-a;if(r=0===s?0:l/s,s==a)n=0;else{switch(s){case t:n=(e-i)/l+(e<i?6:0);break;case e:n=(i-t)/l+2;break;case i:n=(t-e)/l+4}n/=6}return{h:n,s:r,v:o}}function e(t,e,i,n){var r=[j(a(t).toString(16)),j(a(e).toString(16)),j(a(i).toString(16))];return n&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function o(t,e,i,n){return[j(D(n)),j(a(t).toString(16)),j(a(e).toString(16)),j(a(i).toString(16))].join("")}function i(t,e){e=0===e?0:e||10;var i=c(t).toHsl();return i.s-=e/100,i.s=O(i.s),c(i)}function l(t,e){e=0===e?0:e||10;var i=c(t).toHsl();return i.s+=e/100,i.s=O(i.s),c(i)}function h(t){return c(t).desaturate(100)}function m(t,e){e=0===e?0:e||10;var i=c(t).toHsl();return i.l+=e/100,i.l=O(i.l),c(i)}function g(t,e){e=0===e?0:e||10;var i=c(t).toRgb();return i.r=_(0,d(255,i.r-a(-e/100*255))),i.g=_(0,d(255,i.g-a(-e/100*255))),i.b=_(0,d(255,i.b-a(-e/100*255))),c(i)}function v(t,e){e=0===e?0:e||10;var i=c(t).toHsl();return i.l-=e/100,i.l=O(i.l),c(i)}function b(t,e){var i=c(t).toHsl(),n=(i.h+e)%360;return i.h=n<0?360+n:n,c(i)}function y(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function w(t){var e=c(t).toHsl(),i=e.h;return[c(t),c({h:(i+120)%360,s:e.s,l:e.l}),c({h:(i+240)%360,s:e.s,l:e.l})]}function T(t){var e=c(t).toHsl(),i=e.h;return[c(t),c({h:(i+90)%360,s:e.s,l:e.l}),c({h:(i+180)%360,s:e.s,l:e.l}),c({h:(i+270)%360,s:e.s,l:e.l})]}function x(t){var e=c(t).toHsl(),i=e.h;return[c(t),c({h:(i+72)%360,s:e.s,l:e.l}),c({h:(i+216)%360,s:e.s,l:e.l})]}function A(t,e,i){e=e||6,i=i||30;var n=c(t).toHsl(),r=360/i,s=[c(t)];for(n.h=(n.h-(r*e>>1)+720)%360;--e;)n.h=(n.h+r)%360,s.push(c(n));return s}function P(t,e){e=e||6;for(var i=c(t).toHsv(),n=i.h,r=i.s,s=i.v,a=[],o=1/e;e--;)a.push(c({h:n,s:r,v:s})),s=(s+o)%1;return a}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,i,n=this.toRgb();return t=n.r/255,e=n.g/255,i=n.b/255,.2126*(t<=.03928?t/12.92:u.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:u.pow((e+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:u.pow((i+.055)/1.055,2.4))},setAlpha:function(t){return this._a=S(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=s(this._r,this._g,this._b),e=a(360*t.h),i=a(100*t.s),n=a(100*t.v);return 1==this._a?"hsv("+e+", "+i+"%, "+n+"%)":"hsva("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=r(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=r(this._r,this._g,this._b),e=a(360*t.h),i=a(100*t.s),n=a(100*t.l);return 1==this._a?"hsl("+e+", "+i+"%, "+n+"%)":"hsla("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return e(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,i,n,r){var s=[j(a(t).toString(16)),j(a(e).toString(16)),j(a(i).toString(16)),j(D(n))];if(r&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1))return s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0);return s.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*C(this._r,255))+"%",g:a(100*C(this._g,255))+"%",b:a(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*C(this._r,255))+"%, "+a(100*C(this._g,255))+"%, "+a(100*C(this._b,255))+"%)":"rgba("+a(100*C(this._r,255))+"%, "+a(100*C(this._g,255))+"%, "+a(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[e(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+o(this._r,this._g,this._b,this._a),i=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var r=c(t);i="#"+o(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+i+")"},toString:function(t){var e=!!t;t=t||this._format;var i=!1,n=this._a<1&&0<=this._a;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex4"===t&&(i=this.toHex8String(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var i=t.apply(null,[this].concat([].slice.call(e)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(i,arguments)},saturate:function(){return this._applyModification(l,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]="a"===n?t[n]:L(t[n]));t=i}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:t(),g:t(),b:t()})},c.mix=function(t,e,i){i=0===i?0:i||50;var n=c(t).toRgb(),r=c(e).toRgb(),s=i/100;return c({r:(r.r-n.r)*s+n.r,g:(r.g-n.g)*s+n.g,b:(r.b-n.b)*s+n.b,a:(r.a-n.a)*s+n.a})},
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
l.readability=function(e,t){var n=l(e),r=l(t);return(f.max(n.getLuminance(),r.getLuminance())+.05)/(f.min(n.getLuminance(),r.getLuminance())+.05)},l.isReadable=function(e,t,n){var r,o,i=l.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=4.5<=i;break;case"AAlarge":o=3<=i;break;case"AAAsmall":o=7<=i}return o},l.mostReadable=function(e,t,n){var r,o,i,a,s=null,c=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var u=0;u<t.length;u++)c<(r=l.readability(e,t[u]))&&(c=r,s=l(t[u]));return l.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,l.mostReadable(e,["#fff","#000"],n))};var k=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",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:"663399",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"},C=l.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(k);function S(e){return e=parseFloat(e),(isNaN(e)||e<0||1<e)&&(e=1),e}function j(e,t){var n;"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var r,o="string"==typeof(r=e)&&-1!=r.indexOf("%");return e=p(t,g(0,parseFloat(e))),o&&(e=parseInt(e*t,10)/100),f.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return p(1,g(0,e))}function T(e){return parseInt(e,16)}function L(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function H(e){return f.round(255*parseFloat(e)).toString(16)}function N(e){return T(e)/255}var M,V,F,D=(V="[\\s|\\(]+("+(M="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+M+")[,|\\s]+("+M+")\\s*\\)?",F="[\\s|\\(]+("+M+")[,|\\s]+("+M+")[,|\\s]+("+M+")[,|\\s]+("+M+")\\s*\\)?",{CSS_UNIT:new RegExp(M),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function z(e){return!!D.CSS_UNIT.exec(e)}Y.exports?Y.exports=l:window.tinycolor=l}(Math)}),Z=window.THREE||t,a=o=function(e,t){var i=this,a={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 Z.Vector3;var n=new Z.Vector3,s=a.NONE,r=a.NONE,o=new Z.Vector3,c=new Z.Vector2,u=new Z.Vector2,l=new Z.Vector3,f=0,h=new Z.Vector2,d=new Z.Vector2,p=0,g=0,m=new Z.Vector2,b=new Z.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 _,x,E,A,O,k,C,S,j,R,T,L,P=(_=new Z.Vector2,function(e,t){return _.set((e-i.screen.left)/i.screen.width,(t-i.screen.top)/i.screen.height),_}),H=(x=new Z.Vector2,function(e,t){return x.set((e-.5*i.screen.width-i.screen.left)/(.5*i.screen.width),(i.screen.height+2*(i.screen.top-t))/i.screen.width),x});function N(e,t){return Array.isArray(e)?-1!==e.indexOf(t):e===t}function M(e){!1!==i.enabled&&(window.removeEventListener("keydown",M),(r=s)===a.NONE&&(N(i.keys[a.ROTATE],e.keyCode)&&!i.noRotate?s=a.ROTATE:N(i.keys[a.ZOOM],e.keyCode)&&!i.noZoom?s=a.ZOOM:N(i.keys[a.PAN],e.keyCode)&&!i.noPan&&(s=a.PAN)))}function V(e){!1!==i.enabled&&(s=r,window.addEventListener("keydown",M,!1))}function F(e){!1!==i.enabled&&(e.preventDefault(),e.stopPropagation(),s===a.NONE&&(s=e.button),s!==a.ROTATE||i.noRotate?s!==a.ZOOM||i.noZoom?s!==a.PAN||i.noPan||(m.copy(P(e.pageX,e.pageY)),b.copy(m)):(h.copy(P(e.pageX,e.pageY)),d.copy(h)):(u.copy(H(e.pageX,e.pageY)),c.copy(u)),document.addEventListener("mousemove",D,!1),document.addEventListener("mouseup",z,!1),i.dispatchEvent(y))}function D(e){!1!==i.enabled&&(e.preventDefault(),e.stopPropagation(),s!==a.ROTATE||i.noRotate?s!==a.ZOOM||i.noZoom?s!==a.PAN||i.noPan||b.copy(P(e.pageX,e.pageY)):d.copy(P(e.pageX,e.pageY)):(c.copy(u),u.copy(H(e.pageX,e.pageY))))}function z(e){!1!==i.enabled&&(e.preventDefault(),e.stopPropagation(),s=a.NONE,document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",z),i.dispatchEvent(w))}function Y(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 I(e){if(!1!==i.enabled){switch(e.touches.length){case 1:s=a.TOUCH_ROTATE,u.copy(H(e.touches[0].pageX,e.touches[0].pageY)),c.copy(u);break;default:s=a.TOUCH_ZOOM_PAN;var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;g=p=Math.sqrt(t*t+n*n);var r=(e.touches[0].pageX+e.touches[1].pageX)/2,o=(e.touches[0].pageY+e.touches[1].pageY)/2;m.copy(P(r,o)),b.copy(m)}i.dispatchEvent(y)}}function X(e){if(!1!==i.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:c.copy(u),u.copy(H(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;g=Math.sqrt(t*t+n*n);var r=(e.touches[0].pageX+e.touches[1].pageX)/2,o=(e.touches[0].pageY+e.touches[1].pageY)/2;b.copy(P(r,o))}}function U(e){if(!1!==i.enabled){switch(e.touches.length){case 0:s=a.NONE;break;case 1:s=a.TOUCH_ROTATE,u.copy(H(e.touches[0].pageX,e.touches[0].pageY)),c.copy(u)}i.dispatchEvent(w)}}function q(e){!1!==i.enabled&&e.preventDefault()}this.rotateCamera=(A=new Z.Vector3,O=new Z.Quaternion,k=new Z.Vector3,C=new Z.Vector3,S=new Z.Vector3,j=new Z.Vector3,function(){j.set(u.x-c.x,u.y-c.y,0),(E=j.length())?(o.copy(i.object.position).sub(i.target),k.copy(o).normalize(),C.copy(i.object.up).normalize(),S.crossVectors(C,k).normalize(),C.setLength(u.y-c.y),S.setLength(u.x-c.x),j.copy(C.add(S)),A.crossVectors(j,o).normalize(),E*=i.rotateSpeed,O.setFromAxisAngle(A,E),o.applyQuaternion(O),i.object.up.applyQuaternion(O),l.copy(A),f=E):!i.staticMoving&&f&&(f*=Math.sqrt(1-i.dynamicDampingFactor),o.copy(i.object.position).sub(i.target),O.setFromAxisAngle(l,f),o.applyQuaternion(O),i.object.up.applyQuaternion(O)),c.copy(u)}),this.zoomCamera=function(){var e;s===a.TOUCH_ZOOM_PAN?(e=p/g,p=g,o.multiplyScalar(e)):(1!==(e=1+(d.y-h.y)*i.zoomSpeed)&&0<e&&o.multiplyScalar(e),i.staticMoving?h.copy(d):h.y+=(d.y-h.y)*this.dynamicDampingFactor)},this.panCamera=(R=new Z.Vector2,T=new Z.Vector3,L=new Z.Vector3,function(){R.copy(b).sub(m),R.lengthSq()&&(R.multiplyScalar(o.length()*i.panSpeed),L.copy(o).cross(i.object.up).setLength(R.x),L.add(T.copy(i.object.up).setLength(R.y)),i.object.position.add(L),i.target.add(L),i.staticMoving?m.copy(b):m.add(R.subVectors(b,m).multiplyScalar(i.dynamicDampingFactor)))}),this.checkDistances=function(){i.noZoom&&i.noPan||(o.lengthSq()>i.maxDistance*i.maxDistance&&(i.object.position.addVectors(i.target,o.setLength(i.maxDistance)),h.copy(d)),o.lengthSq()<i.minDistance*i.minDistance&&(i.object.position.addVectors(i.target,o.setLength(i.minDistance)),h.copy(d)))},this.update=function(){o.subVectors(i.object.position,i.target),i.noRotate||i.rotateCamera(),i.noZoom||i.zoomCamera(),i.noPan||i.panCamera(),i.object.position.addVectors(i.target,o),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=a.NONE,r=a.NONE,i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.up.copy(i.up0),o.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",q,!1),this.domElement.removeEventListener("mousedown",F,!1),this.domElement.removeEventListener("wheel",Y,!1),this.domElement.removeEventListener("touchstart",I,!1),this.domElement.removeEventListener("touchend",U,!1),this.domElement.removeEventListener("touchmove",X,!1),document.removeEventListener("mousemove",D,!1),document.removeEventListener("mouseup",z,!1),window.removeEventListener("keydown",M,!1),window.removeEventListener("keyup",V,!1)},this.domElement.addEventListener("contextmenu",q,!1),this.domElement.addEventListener("mousedown",F,!1),this.domElement.addEventListener("wheel",Y,!1),this.domElement.addEventListener("touchstart",I,!1),this.domElement.addEventListener("touchend",U,!1),this.domElement.addEventListener("touchmove",X,!1),window.addEventListener("keydown",M,!1),window.addEventListener("keyup",V,!1),this.handleResize(),this.update()};o.prototype=Object.create(Z.EventDispatcher.prototype);var s=r(function(e,t){e.exports=function(n){function r(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,r),t.l=!0,t.exports}var o={};return r.m=n,r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,n){var r,o,i;o=[e,t],void 0!==(i="function"==typeof(r=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})?r.apply(t,o):r)&&(e.exports=i)}])}),c=n(s),u=(s.accessorFn,r(function(e,t){"undefined"!=typeof self&&self,e.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,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 r,o,i,a;a=function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.stateInit,r=void 0===t?function(){return{}}:t,n=e.props,o=void 0===n?{}:n,i=e.methods,s=void 0===i?{}:i,a=e.aliases,c=void 0===a?{}:a,u=e.init,l=void 0===u?function(){}:u,f=e.update,h=void 0===f?function(){}:f,d=Object.keys(o).map(function(e){return new m(e,o[e])});return function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=Object.assign({},r instanceof Function?r():r,{initialised:!1});function a(e){return n(e,t),o(),a}var n=function(e,t){l.call(a,e,i,t),i.initialised=!0},o=(0,p.default)(function(){i.initialised&&h.call(a,i)},1);return d.forEach(function(e){a[e.name]=function(t){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(e,t){};return function(e){return arguments.length?(i[t]=e,r.call(a,e,i),n&&o(),a):i[t]}}(e.name,e.triggerUpdate,e.onChange)}),Object.keys(s).forEach(function(o){a[o]=function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=s[o]).call.apply(e,[a,i].concat(n))}}),Object.entries(c).forEach(function(e){var t=g(e,2),n=t[0],r=t[1];return a[n]=a[r]}),a.resetProps=function(){return d.forEach(function(e){a[e.name](e.defaultVal)}),a},a.resetProps(),i._rerender=o,a}};var r,p=(r=n)&&r.__esModule?r:{default:r},g=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},m=function e(t,n){var r=n.default,o=void 0===r?null:r,i=n.triggerUpdate,a=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=o,this.triggerUpdate=a,this.onChange=c};e.exports=t.default},o=[e,t,n(1)],void 0===(i="function"==typeof(r=a)?r.apply(t,o):r)||(e.exports=i)},function(e,t){e.exports=function(t,n,r){var o,i,a,s,c;function u(){var e=Date.now()-s;e<n&&0<=e?o=setTimeout(u,n-e):(o=null,r||(c=t.apply(a,i),a=i=null))}null==n&&(n=100);var e=function(){a=this,i=arguments,s=Date.now();var e=r&&!o;return o||(o=setTimeout(u,n)),e&&(c=t.apply(a,i),a=i=null),c};return e.clear=function(){o&&(clearTimeout(o),o=null)},e.flush=function(){o&&(c=t.apply(a,i),a=i=null,clearTimeout(o),o=null)},e}}])})),l=n(u),f=(u.Kapsule,window.THREE?window.THREE:{WebGLRenderer:e.WebGLRenderer,Scene:e.Scene,PerspectiveCamera:e.PerspectiveCamera,Raycaster:e.Raycaster,Vector2:e.Vector2,Color:e.Color});return l({props:{width:{default:window.innerWidth},height:{default:window.innerHeight},backgroundColor:{default:"#000011",onChange:function(e,t){var n=i(e).getAlpha();t.renderer.setClearColor(new f.Color(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},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}},methods:{tick:function(e){if(e.initialised&&(e.tbControls.update(),e.renderer.render(e.scene,e.camera),e.enablePointerInteraction)){var t=new f.Raycaster;t.linePrecision=e.lineHoverPrecision,t.setFromCamera(e.mousePos,e.camera);var n=t.intersectObjects(e.objects,!0).map(function(e){return e.object}).sort(e.hoverOrderComparator),r=n.length?n[0]:null;r!==e.hoverObj&&(e.onHover(r,e.hoverObj),e.toolTipElem.innerHTML=r&&c(e.tooltipContent)(r)||"",e.hoverObj=r)}return this},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},tbControls:function(e){return e.tbControls}},stateInit:{renderer:new f.WebGLRenderer({alpha:!0}),scene:new f.Scene,camera:new f.PerspectiveCamera},init:function(e,c){e.innerHTML="",e.appendChild(c.container=document.createElement("div")),c.container.style.position="relative",c.container.appendChild(c.navInfo=document.createElement("div")),c.navInfo.className="scene-nav-info",c.navInfo.textContent="MOVE mouse & press LEFT/A: rotate, MIDDLE/S: zoom, RIGHT/D: pan",c.toolTipElem=document.createElement("div"),c.toolTipElem.classList.add("scene-tooltip"),c.container.appendChild(c.toolTipElem),c.mousePos=new f.Vector2,c.mousePos.x=-2,c.mousePos.y=-2,c.container.addEventListener("mousemove",function(e){if(c.enablePointerInteraction){var t=(o=c.container,i=o.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,{top:i.top+s,left:i.left+a}),n=e.pageX-t.left,r=e.pageY-t.top;c.mousePos.x=n/c.width*2-1,c.mousePos.y=-r/c.height*2+1,c.toolTipElem.style.top=r+"px",c.toolTipElem.style.left=n+"px"}var o,i,a,s},!1),c.container.addEventListener("click",function(e){c.hoverObj&&c.onClick(c.hoverObj)},!1),c.container.appendChild(c.renderer.domElement),c.tbControls=new a(c.camera,c.renderer.domElement),c.tbControls.minDistance=.1,c.tbControls.maxDistance=5e4,c.renderer.setSize(c.width,c.height),c.camera.position.z=1e3,c.camera.far=5e4,window.scene=c.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"}})});
c.readability=function(t,e){var i=c(t),n=c(e);return(u.max(i.getLuminance(),n.getLuminance())+.05)/(u.min(i.getLuminance(),n.getLuminance())+.05)},c.isReadable=function(t,e,i){var n,r,s=c.readability(t,e);switch(r=!1,(n=function(t){var e,i;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),i=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==i&&"large"!==i&&(i="small");return{level:e,size:i}}(i)).level+n.size){case"AAsmall":case"AAAlarge":r=4.5<=s;break;case"AAlarge":r=3<=s;break;case"AAAsmall":r=7<=s}return r},c.mostReadable=function(t,e,i){var n,r,s,a,o=null,l=0;r=(i=i||{}).includeFallbackColors,s=i.level,a=i.size;for(var h=0;h<e.length;h++)l<(n=c.readability(t,e[h]))&&(l=n,o=c(e[h]));return c.isReadable(t,o,{level:s,size:a})||!r?o:(i.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],i))};var k=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",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:"663399",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"},E=c.hexNames=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}(k);function S(t){return t=parseFloat(t),(isNaN(t)||t<0||1<t)&&(t=1),t}function C(t,e){var i;"string"==typeof(i=t)&&-1!=i.indexOf(".")&&1===parseFloat(i)&&(t="100%");var n,r="string"==typeof(n=t)&&-1!=n.indexOf("%");return t=d(e,_(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),u.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function O(t){return d(1,_(0,t))}function R(t){return parseInt(t,16)}function j(t){return 1==t.length?"0"+t:""+t}function L(t){return t<=1&&(t=100*t+"%"),t}function D(t){return u.round(255*parseFloat(t)).toString(16)}function F(t){return R(t)/255}var N,z,I,H=(z="[\\s|\\(]+("+(N="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",I="[\\s|\\(]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",{CSS_UNIT:new RegExp(N),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function M(t){return!!H.CSS_UNIT.exec(t)}U.exports?U.exports=c:window.tinycolor=c}(Math)}),p=a(function(rt){!function(u,f){var p={},n=u.document,d=u.GreenSockGlobals=u.GreenSockGlobals||u;if(!d.TweenLite){var t,e,i,_,m,r,s,g=function(t){var e,i=t.split("."),n=d;for(e=0;e<i.length;e++)n[i[e]]=n=n[i[e]]||{};return n},v=g("com.greensock"),b=1e-10,l=function(t){var e,i=[],n=t.length;for(e=0;e!==n;i.push(t[e++]));return i},y=function(){},w=(r=Object.prototype.toString,s=r.call([]),function(t){return null!=t&&(t instanceof Array||"object"==typeof t&&!!t.push&&r.call(t)===s)}),T={},x=function(o,l,h,c){this.sc=T[o]?T[o].sc:[],(T[o]=this).gsClass=null,this.func=h;var u=[];this.check=function(t){for(var e,i,n,r,s=l.length,a=s;-1<--s;)(e=T[l[s]]||new x(l[s],[])).gsClass?(u[s]=e.gsClass,a--):t&&e.sc.push(this);if(0===a&&h){if(n=(i=("com.greensock."+o).split(".")).pop(),r=g(i.join("."))[n]=this.gsClass=h.apply(h,u),c)if(d[n]=p[n]=r,rt.exports)if(o===f)for(s in rt.exports=p[f]=r,p)r[s]=p[s];else p[f]&&(p[f][n]=r);else 0;for(s=0;s<this.sc.length;s++)this.sc[s].check()}},this.check(!0)},a=u._gsDefine=function(t,e,i,n){return new x(t,e,i,n)},A=v._class=function(t,e,i){return e=e||function(){},a(t,[],function(){return e},i),e};a.globals=d;var o=[0,0,1,1],P=A("easing.Ease",function(t,e,i,n){this._func=t,this._type=i||0,this._power=n||0,this._params=e?o.concat(e):o},!0),k=P.map={},h=P.register=function(t,e,i,n){for(var r,s,a,o,l=e.split(","),h=l.length,c=(i||"easeIn,easeOut,easeInOut").split(",");-1<--h;)for(s=l[h],r=n?A("easing."+s,null,!0):v.easing[s]||{},a=c.length;-1<--a;)o=c[a],k[s+"."+o]=k[o+s]=r[o]=t.getRatio?t:t[o]||new t};for((i=P.prototype)._calcEnd=!1,i.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,n=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?n*=n:2===i?n*=n*n:3===i?n*=n*n*n:4===i&&(n*=n*n*n*n),1===e?1-n:2===e?n:t<.5?n/2:1-n/2},e=(t=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;-1<--e;)i=t[e]+",Power"+e,h(new P(null,null,1,e),i,"easeOut",!0),h(new P(null,null,2,e),i,"easeIn"+(0===e?",easeNone":"")),h(new P(null,null,3,e),i,"easeInOut");k.linear=v.easing.Linear.easeIn,k.swing=v.easing.Quad.easeInOut;var E=A("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(i=E.prototype).addEventListener=function(t,e,i,n,r){r=r||0;var s,a,o=this._listeners[t],l=0;for(this!==_||m||_.wake(),null==o&&(this._listeners[t]=o=[]),a=o.length;-1<--a;)(s=o[a]).c===e&&s.s===i?o.splice(a,1):0===l&&s.pr<r&&(l=a+1);o.splice(l,0,{c:e,s:i,up:n,pr:r})},i.removeEventListener=function(t,e){var i,n=this._listeners[t];if(n)for(i=n.length;-1<--i;)if(n[i].c===e)return void n.splice(i,1)},i.dispatchEvent=function(t){var e,i,n,r=this._listeners[t];if(r)for(1<(e=r.length)&&(r=r.slice(0)),i=this._eventTarget;-1<--e;)(n=r[e])&&(n.up?n.c.call(n.s||i,{type:t,target:i}):n.c.call(n.s||i))};var S=u.requestAnimationFrame,C=u.cancelAnimationFrame,O=Date.now||function(){return(new Date).getTime()},R=O();for(e=(t=["ms","moz","webkit","o"]).length;-1<--e&&!S;)S=u[t[e]+"RequestAnimationFrame"],C=u[t[e]+"CancelAnimationFrame"]||u[t[e]+"CancelRequestAnimationFrame"];A("Ticker",function(t,e){var r,s,a,o,l,h=this,c=O(),i=!(!1===e||!S)&&"auto",u=500,f=33,p=function(t){var e,i,n=O()-R;u<n&&(c+=n-f),R+=n,h.time=(R-c)/1e3,e=h.time-l,(!r||0<e||!0===t)&&(h.frame++,l+=e+(o<=e?.004:o-e),i=!0),!0!==t&&(a=s(p)),i&&h.dispatchEvent("tick")};E.call(h),h.time=h.frame=0,h.tick=function(){p(!0)},h.lagSmoothing=function(t,e){if(!arguments.length)return u<1e10;u=t||1e10,f=Math.min(e,u,0)},h.sleep=function(){null!=a&&(i&&C?C(a):clearTimeout(a),s=y,a=null,h===_&&(m=!1))},h.wake=function(t){null!==a?h.sleep():t?c+=-R+(R=O()):10<h.frame&&(R=O()-u+5),s=0===r?y:i&&S?S:function(t){return setTimeout(t,1e3*(l-h.time)+1|0)},h===_&&(m=!0),p(2)},h.fps=function(t){if(!arguments.length)return r;o=1/((r=t)||60),l=this.time+o,h.wake()},h.useRAF=function(t){if(!arguments.length)return i;h.sleep(),i=t,h.fps(r)},h.fps(t),setTimeout(function(){"auto"===i&&h.frame<5&&"hidden"!==(n||{}).visibilityState&&h.useRAF(!1)},1500)}),(i=v.Ticker.prototype=new v.events.EventDispatcher).constructor=v.Ticker;var c=A("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!0===e.immediateRender,this.data=e.data,this._reversed=!0===e.reversed,$){m||_.wake();var i=this.vars.useFrames?G:$;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});_=c.ticker=new v.Ticker,(i=c.prototype)._dirty=i._gc=i._initted=i._paused=!1,i._totalTime=i._time=0,i._rawPrevTime=-1,i._next=i._last=i._onUpdate=i._timeline=i.timeline=null,i._paused=!1;var j=function(){m&&2e3<O()-R&&("hidden"!==(n||{}).visibilityState||!_.lagSmoothing())&&_.wake();var t=setTimeout(j,2e3);t.unref&&t.unref()};j(),i.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},i.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},i.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},i.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},i.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},i.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},i.render=function(t,e,i){},i.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},i.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<i+this.totalDuration()/this._timeScale-1e-7},i._enabled=function(t,e){return m||_.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},i._kill=function(t,e){return this._enabled(!1,!1)},i.kill=function(t,e){return this._kill(t,e),this},i._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},i._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();-1<--e;)"{self}"===t[e]&&(i[e]=this);return i},i._callback=function(t){var e=this.vars,i=e[t],n=e[t+"Params"],r=e[t+"Scope"]||e.callbackScope||this;switch(n?n.length:0){case 0:i.call(r);break;case 1:i.call(r,n[0]);break;case 2:i.call(r,n[0],n[1]);break;default:i.apply(r,n)}},i.eventCallback=function(t,e,i,n){if("on"===(t||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[t];null==e?delete r[t]:(r[t]=e,r[t+"Params"]=w(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,r[t+"Scope"]=n),"onUpdate"===t&&(this._onUpdate=e)}return this},i.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},i.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&0<this._time&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},i.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},i.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},i.totalTime=function(t,e,i){if(m||_.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var n=this._totalDuration,r=this._timeline;if(n<t&&!i&&(t=n),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?n-t:t)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(N.length&&K(),this.render(t,e,!1),N.length&&K())}return this},i.progress=i.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},i.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},i.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},i.timeScale=function(t){if(!arguments.length)return this._timeScale;var e,i;for(t=t||b,this._timeline&&this._timeline.smoothChildTiming&&(i=(e=this._pauseTime)||0===e?e:this._timeline.totalTime(),this._startTime=i-(i-this._startTime)*this._timeScale/t),this._timeScale=t,i=this.timeline;i&&i.timeline;)i._dirty=!0,i.totalDuration(),i=i.timeline;return this},i.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},i.paused=function(t){if(!arguments.length)return this._paused;var e,i,n=this._timeline;return t!=this._paused&&n&&(m||t||_.wake(),i=(e=n.rawTime())-this._pauseTime,!t&&n.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&(e=n.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var L=A("core.SimpleTimeline",function(t){c.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(i=L.prototype=new c).constructor=L,i.kill()._gc=!1,i._first=i._last=i._recent=null,i._sortChildren=!1,i.add=i.insert=function(t,e,i,n){var r,s;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),r=this._last,this._sortChildren)for(s=t._startTime;r&&r._startTime>s;)r=r._prev;return r?(t._next=r._next,r._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=r,this._recent=t,this._timeline&&this._uncache(!0),this},i._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},i.render=function(t,e,i){var n,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)n=r._next,(r._active||t>=r._startTime&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=n},i.rawTime=function(){return m||_.wake(),this._totalTime};var D=A("TweenLite",function(t,e,i){if(c.call(this,e,i),this.render=D.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:D.selector(t)||t;var n,r,s,a=t.jquery||t.length&&t!==u&&t[0]&&(t[0]===u||t[0].nodeType&&t[0].style&&!t.nodeType),o=this.vars.overwrite;if(this._overwrite=o=null==o?B[D.defaultOverwrite]:"number"==typeof o?o>>0:B[o],(a||t instanceof Array||t.push&&w(t))&&"number"!=typeof t[0])for(this._targets=s=l(t),this._propLookup=[],this._siblings=[],n=0;n<s.length;n++)(r=s[n])?"string"!=typeof r?r.length&&r!==u&&r[0]&&(r[0]===u||r[0].nodeType&&r[0].style&&!r.nodeType)?(s.splice(n--,1),this._targets=s=s.concat(l(r))):(this._siblings[n]=J(r,this,!1),1===o&&1<this._siblings[n].length&&et(r,this,null,1,this._siblings[n])):"string"==typeof(r=s[n--]=D.selector(r))&&s.splice(n+1,1):s.splice(n--,1);else this._propLookup={},this._siblings=J(t,this,!1),1===o&&1<this._siblings.length&&et(t,this,null,1,this._siblings);(this.vars.immediateRender||0===e&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-b,this.render(Math.min(0,-this._delay)))},!0),F=function(t){return t&&t.length&&t!==u&&t[0]&&(t[0]===u||t[0].nodeType&&t[0].style&&!t.nodeType)};(i=D.prototype=new c).constructor=D,i.kill()._gc=!1,i.ratio=0,i._firstPT=i._targets=i._overwrittenProps=i._startAt=null,i._notifyPluginsOfEnabled=i._lazy=!1,D.version="1.20.4",D.defaultEase=i._ease=new P(null,null,1,1),D.defaultOverwrite="auto",D.ticker=_,D.autoSleep=120,D.lagSmoothing=function(t,e){_.lagSmoothing(t,e)},D.selector=u.$||u.jQuery||function(t){var e=u.$||u.jQuery;return e?(D.selector=e)(t):void 0===n?t:n.querySelectorAll?n.querySelectorAll(t):n.getElementById("#"===t.charAt(0)?t.substr(1):t)};var N=[],z={},I=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,H=/[\+-]=-?[\.\d]/,M=function(t){for(var e,i=this._firstPT;i;)e=i.blob?1===t&&null!=this.end?this.end:t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m(e,this._target||i.t):e<1e-6&&-1e-6<e&&!i.blob&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},U=function(t,e,i,n){var r,s,a,o,l,h,c,u=[],f=0,p="",d=0;for(u.start=t,u.end=e,t=u[0]=t+"",e=u[1]=e+"",i&&(i(u),t=u[0],e=u[1]),u.length=0,r=t.match(I)||[],s=e.match(I)||[],n&&(n._next=null,n.blob=1,u._firstPT=u._applyPT=n),l=s.length,o=0;o<l;o++)c=s[o],p+=(h=e.substr(f,e.indexOf(c,f)-f))||!o?h:",",f+=h.length,d?d=(d+1)%5:"rgba("===h.substr(-5)&&(d=1),c===r[o]||r.length<=o?p+=c:(p&&(u.push(p),p=""),a=parseFloat(r[o]),u.push(a),u._firstPT={_next:u._firstPT,t:u,p:u.length-1,s:a,c:("="===c.charAt(1)?parseInt(c.charAt(0)+"1",10)*parseFloat(c.substr(2)):parseFloat(c)-a)||0,f:0,m:d&&d<4?Math.round:0}),f+=c.length;return(p+=e.substr(f))&&u.push(p),u.setRatio=M,H.test(e)&&(u.end=null),u},V=function(t,e,i,n,r,s,a,o,l){"function"==typeof n&&(n=n(l||0,t));var h=typeof t[e],c="function"!==h?"":e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),u="get"!==i?i:c?a?t[c](a):t[c]():t[e],f="string"==typeof n&&"="===n.charAt(1),p={t:t,p:e,s:u,f:"function"===h,pg:0,n:r||e,m:s?"function"==typeof s?s:Math.round:0,pr:0,c:f?parseInt(n.charAt(0)+"1",10)*parseFloat(n.substr(2)):parseFloat(n)-u||0};if(("number"!=typeof u||"number"!=typeof n&&!f)&&(a||isNaN(u)||!f&&isNaN(n)||"boolean"==typeof u||"boolean"==typeof n?(p.fp=a,p={t:U(u,f?parseFloat(p.s)+p.c+(p.s+"").replace(/[0-9\-\.]/g,""):n,o||D.defaultStringFilter,p),p:"setRatio",s:0,c:1,f:2,pg:0,n:r||e,pr:0,m:0}):(p.s=parseFloat(u),f||(p.c=parseFloat(n)-p.s||0))),p.c)return(p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p},q=D._internals={isArray:w,isSelector:F,lazyTweens:N,blobDif:U},Y=D._plugins={},X=q.tweenLookup={},Z=0,Q=q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},B={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},G=c._rootFramesTimeline=new L,$=c._rootTimeline=new L,W=30,K=q.lazyRender=function(){var t,e=N.length;for(z={};-1<--e;)(t=N[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);N.length=0};$._startTime=_.time,G._startTime=_.frame,$._active=G._active=!0,setTimeout(K,1),c._updateRoot=D.render=function(){var t,e,i;if(N.length&&K(),$.render((_.time-$._startTime)*$._timeScale,!1,!1),G.render((_.frame-G._startTime)*G._timeScale,!1,!1),N.length&&K(),_.frame>=W){for(i in W=_.frame+(parseInt(D.autoSleep,10)||120),X){for(t=(e=X[i].tweens).length;-1<--t;)e[t]._gc&&e.splice(t,1);0===e.length&&delete X[i]}if((!(i=$._first)||i._paused)&&D.autoSleep&&!G._first&&1===_._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||_.sleep()}}},_.addEventListener("tick",c._updateRoot);var J=function(t,e,i){var n,r,s=t._gsTweenID;if(X[s||(t._gsTweenID=s="t"+Z++)]||(X[s]={target:t,tweens:[]}),e&&((n=X[s].tweens)[r=n.length]=e,i))for(;-1<--r;)n[r]===e&&n.splice(r,1);return X[s].tweens},tt=function(t,e,i,n){var r,s,a=t.vars.onOverwrite;return a&&(r=a(t,e,i,n)),(a=D.onOverwrite)&&(s=a(t,e,i,n)),!1!==r&&!1!==s},et=function(t,e,i,n,r){var s,a,o,l;if(1===n||4<=n){for(l=r.length,s=0;s<l;s++)if((o=r[s])!==e)o._gc||o._kill(null,t,e)&&(a=!0);else if(5===n)break;return a}var h,c=e._startTime+b,u=[],f=0,p=0===e._duration;for(s=r.length;-1<--s;)(o=r[s])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||it(e,0,p),0===it(o,h,p)&&(u[f++]=o)):o._startTime<=c&&o._startTime+o.totalDuration()/o._timeScale>c&&((p||!o._initted)&&c-o._startTime<=2e-10||(u[f++]=o)));for(s=f;-1<--s;)if(o=u[s],2===n&&o._kill(i,t,e)&&(a=!0),2!==n||!o._firstPT&&o._initted){if(2!==n&&!tt(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},it=function(t,e,i){for(var n=t._timeline,r=n._timeScale,s=t._startTime;n._timeline;){if(s+=n._startTime,r*=n._timeScale,n._paused)return-100;n=n._timeline}return e<(s/=r)?s-e:i&&s===e||!t._initted&&s-e<2*b?b:(s+=t.totalDuration()/t._timeScale/r)>e+b?0:s-e-b};i._init=function(){var t,e,i,n,r,s,a=this.vars,o=this._overwrittenProps,l=this._duration,h=!!a.immediateRender,c=a.ease;if(a.startAt){for(n in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={},a.startAt)r[n]=a.startAt[n];if(r.data="isStart",r.overwrite=!1,r.immediateRender=!0,r.lazy=h&&!1!==a.lazy,r.startAt=r.delay=null,r.onUpdate=a.onUpdate,r.onUpdateParams=a.onUpdateParams,r.onUpdateScope=a.onUpdateScope||a.callbackScope||this,this._startAt=D.to(this.target,0,r),h)if(0<this._time)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{for(n in 0!==this._time&&(h=!1),i={},a)Q[n]&&"autoCSS"!==n||(i[n]=a[n]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&!1!==a.lazy,i.immediateRender=h,this._startAt=D.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=c=c?c instanceof P?c:"function"==typeof c?new P(c,a.easeParams):k[c]||D.defaultEase:D.defaultEase,a.easeParams instanceof Array&&c.config&&(this._ease=c.config.apply(c,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(s=this._targets.length,t=0;t<s;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],o?o[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,o,0);if(e&&D._onPluginEvent("_onInitAllProps",this),o&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=a.onUpdate,this._initted=!0},i._initProps=function(t,e,i,n,r){var s,a,o,l,h,c;if(null==t)return!1;for(s in z[t._gsTweenID]&&K(),this.vars.css||t.style&&t!==u&&t.nodeType&&Y.css&&!1!==this.vars.autoCSS&&function(t,e){var i,n={};for(i in t)Q[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!Y[i]||Y[i]&&Y[i]._autoCSS)||(n[i]=t[i],delete t[i]);t.css=n}(this.vars,t),this.vars)if(c=this.vars[s],Q[s])c&&(c instanceof Array||c.push&&w(c))&&-1!==c.join("").indexOf("{self}")&&(this.vars[s]=c=this._swapSelfInParams(c,this));else if(Y[s]&&(l=new Y[s])._onInitTween(t,this.vars[s],this,r)){for(this._firstPT=h={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:s,pg:1,pr:l._priority,m:0},a=l._overwriteProps.length;-1<--a;)e[l._overwriteProps[a]]=this._firstPT;(l._priority||l._onInitAllProps)&&(o=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),h._next&&(h._next._prev=h)}else e[s]=V.call(this,t,s,"get",c,s,0,null,this.vars.stringFilter,r);return n&&this._kill(n,t)?this._initProps(t,e,i,n,r):1<this._overwrite&&this._firstPT&&1<i.length&&et(t,this,e,this._overwrite,i)?(this._kill(e,t),this._initProps(t,e,i,n,r)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(z[t._gsTweenID]=!0),o)},i.render=function(t,e,i){var n,r,s,a,o=this._time,l=this._duration,h=this._rawPrevTime;if(l-1e-7<=t&&0<=t)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(n=!0,r="onComplete",i=i||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(h<0||t<=0&&-1e-7<=t||h===b&&"isPause"!==this.data)&&h!==t&&(i=!0,b<h&&(r="onReverseComplete")),this._rawPrevTime=a=!e||t||h===t?t:b);else if(t<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&0<h)&&(r="onReverseComplete",n=this._reversed),t<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(0<=h&&(h!==b||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||h===t?t:b)),(!this._initted||this._startAt&&this._startAt.progress())&&(i=!0);else if(this._totalTime=this._time=t,this._easeType){var c=t/l,u=this._easeType,f=this._easePower;(1===u||3===u&&.5<=c)&&(c=1-c),3===u&&(c*=2),1===f?c*=c:2===f?c*=c*c:3===f?c*=c*c*c:4===f&&(c*=c*c*c*c),this.ratio=1===u?1-c:2===u?c:t/l<.5?c/2:1-c/2}else this.ratio=this._ease.getRatio(t/l);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=h,N.push(this),void(this._lazy=[t,e]);this._time&&!n?this.ratio=this._ease.getRatio(this._time/l):n&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&0<=t&&(this._active=!0),0===o&&(this._startAt&&(0<=t?this._startAt.render(t,!0,i):r||(r="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||e||this._callback("onStart"))),s=this._firstPT;s;)s.f?s.t[s.p](s.c*this.ratio+s.s):s.t[s.p]=s.c*this.ratio+s.s,s=s._next;this._onUpdate&&(t<0&&this._startAt&&-1e-4!==t&&this._startAt.render(t,!0,i),e||(this._time!==o||n||i)&&this._callback("onUpdate")),r&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,!0,i),n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this._callback(r),0===l&&this._rawPrevTime===b&&a!==b&&(this._rawPrevTime=0)))}},i._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:D.selector(e)||e;var n,r,s,a,o,l,h,c,u,f=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((w(e)||F(e))&&"number"!=typeof e[0])for(n=e.length;-1<--n;)this._kill(t,e[n],i)&&(l=!0);else{if(this._targets){for(n=this._targets.length;-1<--n;)if(e===this._targets[n]){o=this._propLookup[n]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[n]=t?this._overwrittenProps[n]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,r=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,c=t!==r&&"all"!==r&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(D.onOverwrite||this.vars.onOverwrite)){for(s in h)o[s]&&(u||(u=[]),u.push(s));if((u||!t)&&!tt(this,i,e,u))return!1}for(s in h)(a=o[s])&&(f&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[s]),c&&(r[s]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},i.invalidate=function(){return this._notifyPluginsOfEnabled&&D._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],c.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-b,this.render(Math.min(0,-this._delay))),this},i._enabled=function(t,e){if(m||_.wake(),t&&this._gc){var i,n=this._targets;if(n)for(i=n.length;-1<--i;)this._siblings[i]=J(n[i],this,!0);else this._siblings=J(this.target,this,!0)}return c.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&D._onPluginEvent(t?"_onEnable":"_onDisable",this)},D.to=function(t,e,i){return new D(t,e,i)},D.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new D(t,e,i)},D.fromTo=function(t,e,i,n){return n.startAt=i,n.immediateRender=0!=n.immediateRender&&0!=i.immediateRender,new D(t,e,n)},D.delayedCall=function(t,e,i,n,r){return new D(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:n,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},D.set=function(t,e){return new D(t,0,e)},D.getTweensOf=function(t,e){if(null==t)return[];var i,n,r,s;if(t="string"!=typeof t?t:D.selector(t)||t,(w(t)||F(t))&&"number"!=typeof t[0]){for(i=t.length,n=[];-1<--i;)n=n.concat(D.getTweensOf(t[i],e));for(i=n.length;-1<--i;)for(s=n[i],r=i;-1<--r;)s===n[r]&&n.splice(i,1)}else if(t._gsTweenID)for(i=(n=J(t).concat()).length;-1<--i;)(n[i]._gc||e&&!n[i].isActive())&&n.splice(i,1);return n||[]},D.killTweensOf=D.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var n=D.getTweensOf(t,e),r=n.length;-1<--r;)n[r]._kill(i,t)};var nt=A("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=nt.prototype},!0);if(i=nt.prototype,nt.version="1.19.0",nt.API=2,i._firstPT=null,i._addTween=V,i.setRatio=M,i._kill=function(t){var e,i=this._overwriteProps,n=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;-1<--e;)null!=t[i[e]]&&i.splice(e,1);for(;n;)null!=t[n.n]&&(n._next&&(n._next._prev=n._prev),n._prev?(n._prev._next=n._next,n._prev=null):this._firstPT===n&&(this._firstPT=n._next)),n=n._next;return!1},i._mod=i._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},D._onPluginEvent=function(t,e){var i,n,r,s,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,n=r;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:s)?o._prev._next=o:r=o,(o._next=n)?n._prev=o:s=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},nt.activate=function(t){for(var e=t.length;-1<--e;)t[e].API===nt.API&&(Y[(new t[e])._propName]=t[e]);return!0},a.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,n=t.priority||0,r=t.overwriteProps,s={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=A("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){nt.call(this,i,n),this._overwriteProps=r||[]},!0===t.global),o=a.prototype=new nt(i);for(e in(o.constructor=a).API=t.API,s)"function"==typeof t[e]&&(o[s[e]]=t[e]);return a.version=t.version,nt.activate([a]),a},t=u._gsQueue){for(e=0;e<t.length;e++)t[e]();for(i in T)T[i].func||u.console.log("GSAP encountered missing dependency: "+i)}m=!1}}(rt.exports&&void 0!==r?r:r||window,"TweenLite")}),l=a(function(t,e){t.exports=function(i){function n(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,n),e.l=!0,e.exports}var r={};return n.m=i,n.c=r,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,i){var n,r,s;r=[t,e],void 0!==(s="function"==typeof(n=function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e instanceof Function?e:"string"==typeof e?function(t){return t[e]}:function(t){return e}},t.exports=e.default})?n.apply(e,r):n)&&(t.exports=s)}])}),h=s(l),c=(l.accessorFn,a(function(t,e){"undefined"!=typeof self&&self,t.exports=function(i){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=i,r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,i){var n,r,s,a;a=function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.stateInit,n=void 0===e?function(){return{}}:e,i=t.props,r=void 0===i?{}:i,s=t.methods,o=void 0===s?{}:s,a=t.aliases,l=void 0===a?{}:a,h=t.init,c=void 0===h?function(){}:h,u=t.update,f=void 0===u?function(){}:u,p=Object.keys(r).map(function(t){return new m(t,r[t])});return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},s=Object.assign({},n instanceof Function?n():n,{initialised:!1});function a(t){return i(t,e),r(),a}var i=function(t,e){c.call(a,t,s,e),s.initialised=!0},r=(0,d.default)(function(){s.initialised&&f.call(a,s)},1);return p.forEach(function(t){a[t.name]=function(e){var i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(t,e){};return function(t){return arguments.length?(s[e]=t,n.call(a,t,s),i&&r(),a):s[e]}}(t.name,t.triggerUpdate,t.onChange)}),Object.keys(o).forEach(function(r){a[r]=function(){for(var t,e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];return(t=o[r]).call.apply(t,[a,s].concat(i))}}),Object.entries(l).forEach(function(t){var e=_(t,2),i=e[0],n=e[1];return a[i]=a[n]}),a.resetProps=function(){return p.forEach(function(t){a[t.name](t.defaultVal)}),a},a.resetProps(),s._rerender=r,a}};var n,d=(n=i)&&n.__esModule?n:{default:n},_=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,s=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,s=t}finally{try{!n&&o.return&&o.return()}finally{if(r)throw s}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},m=function t(e,i){var n=i.default,r=void 0===n?null:n,s=i.triggerUpdate,a=void 0===s||s,o=i.onChange,l=void 0===o?function(t,e){}:o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e,this.defaultVal=r,this.triggerUpdate=a,this.onChange=l};t.exports=e.default},r=[t,e,i(1)],void 0===(s="function"==typeof(n=a)?n.apply(e,r):n)||(t.exports=s)},function(t,e){t.exports=function(e,i,n){var r,s,a,o,l;function h(){var t=Date.now()-o;t<i&&0<=t?r=setTimeout(h,i-t):(r=null,n||(l=e.apply(a,s),a=s=null))}null==i&&(i=100);var t=function(){a=this,s=arguments,o=Date.now();var t=n&&!r;return r||(r=setTimeout(h,i)),t&&(l=e.apply(a,s),a=s=null),l};return t.clear=function(){r&&(clearTimeout(r),r=null)},t.flush=function(){r&&(l=e.apply(a,s),a=s=null,clearTimeout(r),r=null)},t}}])})),u=s(c),d=(c.Kapsule,window.THREE?window.THREE:{WebGLRenderer:t.WebGLRenderer,Scene:t.Scene,PerspectiveCamera:t.PerspectiveCamera,Raycaster:t.Raycaster,Vector2:t.Vector2,Vector3:t.Vector3,Color:t.Color});return u({props:{width:{default:window.innerWidth},height:{default:window.innerHeight},backgroundColor:{default:"#000011",onChange:function(t,e){var i=o(t).getAlpha();e.renderer.setClearColor(new d.Color(t),i)},triggerUpdate:!1},showNavInfo:{default:!0},objects:{default:[],onChange:function(t,e){(e.prevObjs||[]).forEach(function(t){return e.scene.remove(t)}),(e.prevObjs=t).forEach(function(t){return e.scene.add(t)})},triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(t,e){e.hoverObj=null},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}},methods:{tick:function(t){if(t.initialised&&(t.tbControls.update(),t.renderer.render(t.scene,t.camera),t.enablePointerInteraction)){var e=new d.Raycaster;e.linePrecision=t.lineHoverPrecision,e.setFromCamera(t.mousePos,t.camera);var i=e.intersectObjects(t.objects,!0).map(function(t){return t.object}).sort(t.hoverOrderComparator),n=i.length?i[0]:null;n!==t.hoverObj&&(t.onHover(n,t.hoverObj),t.toolTipElem.innerHTML=n&&h(t.tooltipContent)(n)||"",t.hoverObj=n)}return this},cameraPosition:function(e,t,i,n){var r=e.camera;if(t&&e.initialised){var s=t,a=i||{x:0,y:0,z:0};if(n){var o=Object.assign({},r.position),l=f(),h=n/1e3;p.to(o,h,Object.assign({onUpdate:function(){return c(o)}},s)),p.to(l,h/3,Object.assign({onUpdate:function(){return u(l)}},a))}else c(s),u(a);return this}return Object.assign({},r.position,{lookAt:f()});function c(t){var e=t.x,i=t.y,n=t.z;void 0!==e&&(r.position.x=e),void 0!==i&&(r.position.y=i),void 0!==n&&(r.position.z=n)}function u(t){e.tbControls.target=new d.Vector3(t.x,t.y,t.z)}function f(){return Object.assign(new d.Vector3(0,0,-1e3).applyQuaternion(r.quaternion).add(r.position))}},renderer:function(t){return t.renderer},scene:function(t){return t.scene},camera:function(t){return t.camera},tbControls:function(t){return t.tbControls}},stateInit:{renderer:new d.WebGLRenderer({alpha:!0}),scene:new d.Scene,camera:new d.PerspectiveCamera},init:function(t,l){t.innerHTML="",t.appendChild(l.container=document.createElement("div")),l.container.style.position="relative",l.container.appendChild(l.navInfo=document.createElement("div")),l.navInfo.className="scene-nav-info",l.navInfo.textContent="MOVE mouse & press LEFT/A: rotate, MIDDLE/S: zoom, RIGHT/D: pan",l.toolTipElem=document.createElement("div"),l.toolTipElem.classList.add("scene-tooltip"),l.container.appendChild(l.toolTipElem),l.mousePos=new d.Vector2,l.mousePos.x=-2,l.mousePos.y=-2,l.container.addEventListener("mousemove",function(t){if(l.enablePointerInteraction){var e=(r=l.container,s=r.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,{top:s.top+o,left:s.left+a}),i=t.pageX-e.left,n=t.pageY-e.top;l.mousePos.x=i/l.width*2-1,l.mousePos.y=-n/l.height*2+1,l.toolTipElem.style.top=n+"px",l.toolTipElem.style.left=i+"px"}var r,s,a,o},!1),l.container.addEventListener("click",function(t){l.hoverObj&&l.onClick(l.hoverObj)},!1),l.container.appendChild(l.renderer.domElement),l.tbControls=new n(l.camera,l.renderer.domElement),l.tbControls.minDistance=.1,l.tbControls.maxDistance=5e4,l.renderer.setSize(l.width,l.height),l.camera.position.z=1e3,l.camera.far=5e4,window.scene=l.scene},update:function(t){t.width&&t.height&&(t.container.style.width=t.width,t.container.style.height=t.height,t.renderer.setSize(t.width,t.height),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix()),t.navInfo.style.display=t.showNavInfo?null:"none"}})});

@@ -1,4 +0,5 @@

import { WebGLRenderer, Scene, PerspectiveCamera, Raycaster, Vector2, Color } from 'three';
import { WebGLRenderer, Scene, PerspectiveCamera, Raycaster, Vector2, Vector3, Color } from 'three';
import ThreeTrackballControls from 'three-trackballcontrols';
import tinycolor from 'tinycolor2';
import ThreeTrackballControls from 'three-trackballcontrols';
import TweenLite from 'gsap/TweenLite';
import accessorFn from 'accessor-fn';

@@ -46,2 +47,3 @@ import Kapsule from 'kapsule';

Vector2: Vector2,
Vector3: Vector3,
Color: Color

@@ -116,2 +118,59 @@ };

},
cameraPosition: function cameraPosition(state, position, lookAt, transitionDuration) {
var camera = state.camera;
// Setter
if (position && state.initialised) {
var finalPos = position;
var finalLookAt = lookAt || { x: 0, y: 0, z: 0 };
if (!transitionDuration) {
// no animation
setCameraPos(finalPos);
setLookAt(finalLookAt);
} else {
var camPos = Object.assign({}, camera.position);
var camLookAt = getLookAt();
var tweenDuration = transitionDuration / 1000; // ms > s
TweenLite.to(camPos, tweenDuration, Object.assign({
onUpdate: function onUpdate() {
return setCameraPos(camPos);
}
}, finalPos));
// Face direction in 1/3rd of time
TweenLite.to(camLookAt, tweenDuration / 3, Object.assign({
onUpdate: function onUpdate() {
return setLookAt(camLookAt);
}
}, finalLookAt));
}
return this;
}
// Getter
return Object.assign({}, camera.position, { lookAt: getLookAt() });
//
function setCameraPos(pos) {
var x = pos.x,
y = pos.y,
z = pos.z;
if (x !== undefined) camera.position.x = x;
if (y !== undefined) camera.position.y = y;
if (z !== undefined) camera.position.z = z;
}
function setLookAt(lookAt) {
state.tbControls.target = new three.Vector3(lookAt.x, lookAt.y, lookAt.z);
}
function getLookAt() {
return Object.assign(new three.Vector3(0, 0, -1000).applyQuaternion(camera.quaternion).add(camera.position));
}
},
renderer: function renderer(state) {

@@ -118,0 +177,0 @@ return state.renderer;

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

@@ -37,2 +37,3 @@ "unpkg": "dist/three-render-objects.min.js",

"accessor-fn": "^1.2.2",
"gsap": "^1.20.4",
"kapsule": "^1.9.0",

@@ -39,0 +40,0 @@ "three-trackballcontrols": "^0.0.7",

@@ -7,2 +7,3 @@ import {

Vector2,
Vector3,
Color

@@ -19,9 +20,11 @@ } from 'three';

Vector2,
Vector3,
Color
};
import ThreeTrackballControls from 'three-trackballcontrols';
import tinycolor from 'tinycolor2';
import TweenLite from 'gsap/TweenLite';
import ThreeTrackballControls from 'three-trackballcontrols';
import accessorFn from 'accessor-fn';

@@ -84,2 +87,55 @@ import Kapsule from 'kapsule';

},
cameraPosition: function(state, position, lookAt, transitionDuration) {
const camera = state.camera;
// Setter
if (position && state.initialised) {
const finalPos = position;
const finalLookAt = lookAt || {x: 0, y: 0, z: 0};
if (!transitionDuration) { // no animation
setCameraPos(finalPos);
setLookAt(finalLookAt);
} else {
const camPos = Object.assign({}, camera.position);
const camLookAt = getLookAt();
const tweenDuration = transitionDuration/1000; // ms > s
TweenLite.to(camPos, tweenDuration, Object.assign({
onUpdate: () => setCameraPos(camPos)
}, finalPos));
// Face direction in 1/3rd of time
TweenLite.to(camLookAt, tweenDuration/3, Object.assign({
onUpdate: () => setLookAt(camLookAt)
}, finalLookAt));
}
return this;
}
// Getter
return Object.assign({}, camera.position, { lookAt: getLookAt() });
//
function setCameraPos(pos) {
const { x, y, z } = pos;
if (x !== undefined) camera.position.x = x;
if (y !== undefined) camera.position.y = y;
if (z !== undefined) camera.position.z = z;
}
function setLookAt(lookAt) {
state.tbControls.target = new three.Vector3(lookAt.x, lookAt.y, lookAt.z);
}
function getLookAt() {
return Object.assign(
(new three.Vector3(0, 0, -1000))
.applyQuaternion(camera.quaternion)
.add(camera.position)
);
}
},
renderer: state => state.renderer,

@@ -86,0 +142,0 @@ scene: state => state.scene,

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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