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

three-globe

Package Overview
Dependencies
Maintainers
1
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-globe - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

dist/three-globe.js

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

// Version 1.0.4 three-globe - https://github.com/vasturiano/three-globe
// Version 1.0.5 three-globe - https://github.com/vasturiano/three-globe
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('three')) :

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

// Version 1.0.4 three-globe - https://github.com/vasturiano/three-globe
// Version 1.0.5 three-globe - https://github.com/vasturiano/three-globe
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three")):"function"==typeof define&&define.amd?define(["three"],t):(e=e||self).ThreeGlobe=t(e.THREE)}(this,function(e){"use strict";"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=n(function(e,t){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r,a,i,o;o=function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,s=void 0===r?{}:r,l=e.methods,u=void 0===l?{}:l,f=e.aliases,c=void 0===f?{}:f,h=e.init,d=void 0===h?function(){}:h,g=e.update,p=void 0===g?function(){}:g,b=Object.keys(s).map(function(e){return new o(e,s[e])});return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1});function r(t){return o(t,e),s(),r}var o=function(e,n){d.call(r,e,t,n),t.initialised=!0},s=(0,a.default)(function(){t.initialised&&p.call(r,t)},1);return b.forEach(function(e){r[e.name]=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e,t){};return function(i){var o=t[e];return arguments.length?(t[e]=i,a.call(r,i,t,o),n&&s(),r):o}}(e.name,e.triggerUpdate,e.onChange)}),Object.keys(u).forEach(function(e){r[e]=function(){for(var n,a=arguments.length,i=Array(a),o=0;o<a;o++)i[o]=arguments[o];return(n=u[e]).call.apply(n,[r,t].concat(i))}}),Object.entries(c).forEach(function(e){var t=i(e,2),n=t[0],a=t[1];return r[n]=r[a]}),r.resetProps=function(){return b.forEach(function(e){r[e.name](e.defaultVal)}),r},r.resetProps(),t._rerender=s,r}};var r,a=(r=n)&&r.__esModule?r:{default:r},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function e(t,n){var r=n.default,a=void 0===r?null:r,i=n.triggerUpdate,o=void 0===i||i,s=n.onChange,l=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=a,this.triggerUpdate=o,this.onChange=l};e.exports=t.default},a=[e,t,n(1)],void 0===(i="function"==typeof(r=o)?r.apply(t,a):r)||(e.exports=i)},function(e,t){e.exports=function(e,t,n){var r,a,i,o,s;function l(){var u=Date.now()-o;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(s=e.apply(i,a),i=a=null))}null==t&&(t=100);var u=function(){i=this,a=arguments,o=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(s=e.apply(i,a),i=a=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=e.apply(i,a),i=a=null,clearTimeout(r),r=null)},u}}])}),a=t(r),i=(r.Kapsule,n(function(e,t){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){var r,a,i;a=[e,t],void 0!==(i="function"==typeof(r=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e instanceof Function?e:"string"==typeof e?function(t){return t[e]}:function(t){return e}},e.exports=t.default})?r.apply(t,a):r)&&(e.exports=i)}])})),o=t(i),s=(i.accessorFn,n(function(e){!function(t){var n=/^\s+/,r=/\s+$/,a=0,i=t.round,o=t.min,s=t.max,l=t.random;function u(e,l){if(l=l||{},(e=e||"")instanceof u)return e;if(!(this instanceof u))return new u(e,l);var f=function(e){var a={r:0,g:0,b:0},i=1,l=null,u=null,f=null,c=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(n,"").replace(r,"").toLowerCase();var t,a=!1;if(R[e])e=R[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:L(t[1]),g:L(t[2]),b:L(t[3]),a:E(t[4]),format:a?"name":"hex8"};if(t=U.hex6.exec(e))return{r:L(t[1]),g:L(t[2]),b:L(t[3]),format:a?"name":"hex"};if(t=U.hex4.exec(e))return{r:L(t[1]+""+t[1]),g:L(t[2]+""+t[2]),b:L(t[3]+""+t[3]),a:E(t[4]+""+t[4]),format:a?"name":"hex8"};if(t=U.hex3.exec(e))return{r:L(t[1]+""+t[1]),g:L(t[2]+""+t[2]),b:L(t[3]+""+t[3]),format:a?"name":"hex"};return!1}(e));"object"==typeof e&&(D(e.r)&&D(e.g)&&D(e.b)?(d=e.r,g=e.g,p=e.b,a={r:255*j(d,255),g:255*j(g,255),b:255*j(p,255)},c=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):D(e.h)&&D(e.s)&&D(e.v)?(l=H(e.s),u=H(e.v),a=function(e,n,r){e=6*j(e,360),n=j(n,100),r=j(r,100);var a=t.floor(e),i=e-a,o=r*(1-n),s=r*(1-i*n),l=r*(1-(1-i)*n),u=a%6;return{r:255*[r,s,o,o,l,r][u],g:255*[l,r,r,s,o,o][u],b:255*[o,o,l,r,r,s][u]}}(e.h,l,u),c=!0,h="hsv"):D(e.h)&&D(e.s)&&D(e.l)&&(l=H(e.s),f=H(e.l),a=function(e,t,n){var r,a,i;function o(e,t,n){return n<0&&(n+=1),n>1&&(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=a=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),a=o(l,s,e),i=o(l,s,e-1/3)}return{r:255*r,g:255*a,b:255*i}}(e.h,l,f),c=!0,h="hsl"),e.hasOwnProperty("a")&&(i=e.a));var d,g,p;return i=N(i),{ok:c,format:e.format||h,r:o(255,s(a.r,0)),g:o(255,s(a.g,0)),b:o(255,s(a.b,0)),a:i}}(e);this._originalInput=e,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=i(100*this._a)/100,this._format=l.format||f.format,this._gradientType=l.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=f.ok,this._tc_id=a++}function f(e,t,n){e=j(e,255),t=j(t,255),n=j(n,255);var r,a,i=s(e,t,n),l=o(e,t,n),u=(i+l)/2;if(i==l)r=a=0;else{var f=i-l;switch(a=u>.5?f/(2-i-l):f/(i+l),i){case e:r=(t-n)/f+(t<n?6:0);break;case t:r=(n-e)/f+2;break;case n:r=(e-t)/f+4}r/=6}return{h:r,s:a,l:u}}function c(e,t,n){e=j(e,255),t=j(t,255),n=j(n,255);var r,a,i=s(e,t,n),l=o(e,t,n),u=i,f=i-l;if(a=0===i?0:f/i,i==l)r=0;else{switch(i){case e:r=(t-n)/f+(t<n?6:0);break;case t:r=(n-e)/f+2;break;case n:r=(e-t)/f+4}r/=6}return{h:r,s:a,v:u}}function h(e,t,n,r){var a=[G(i(e).toString(16)),G(i(t).toString(16)),G(i(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function d(e,t,n,r){return[G(T(r)),G(i(e).toString(16)),G(i(t).toString(16)),G(i(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.s-=t/100,n.s=O(n.s),u(n)}function p(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.s+=t/100,n.s=O(n.s),u(n)}function b(e){return u(e).desaturate(100)}function m(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.l+=t/100,n.l=O(n.l),u(n)}function v(e,t){t=0===t?0:t||10;var n=u(e).toRgb();return n.r=s(0,o(255,n.r-i(-t/100*255))),n.g=s(0,o(255,n.g-i(-t/100*255))),n.b=s(0,o(255,n.b-i(-t/100*255))),u(n)}function _(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.l-=t/100,n.l=O(n.l),u(n)}function y(e,t){var n=u(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,u(n)}function x(e){var t=u(e).toHsl();return t.h=(t.h+180)%360,u(t)}function k(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+120)%360,s:t.s,l:t.l}),u({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+90)%360,s:t.s,l:t.l}),u({h:(n+180)%360,s:t.s,l:t.l}),u({h:(n+270)%360,s:t.s,l:t.l})]}function M(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+72)%360,s:t.s,l:t.l}),u({h:(n+216)%360,s:t.s,l:t.l})]}function A(e,t,n){t=t||6,n=n||30;var r=u(e).toHsl(),a=360/n,i=[u(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,i.push(u(r));return i}function C(e,t){t=t||6;for(var n=u(e).toHsv(),r=n.h,a=n.s,i=n.v,o=[],s=1/t;t--;)o.push(u({h:r,s:a,v:i})),i=(i+s)%1;return o}u.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,n,r,a=this.toRgb();return e=a.r/255,n=a.g/255,r=a.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=N(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=c(this._r,this._g,this._b),t=i(360*e.h),n=i(100*e.s),r=i(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=i(360*e.h),n=i(100*e.s),r=i(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return h(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,a){var o=[G(i(e).toString(16)),G(i(t).toString(16)),G(i(n).toString(16)),G(T(r))];if(a&&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[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*j(this._r,255))+"%",g:i(100*j(this._g,255))+"%",b:i(100*j(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*j(this._r,255))+"%, "+i(100*j(this._g,255))+"%, "+i(100*j(this._b,255))+"%)":"rgba("+i(100*j(this._r,255))+"%, "+i(100*j(this._g,255))+"%, "+i(100*j(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+d(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=u(e);n="#"+d(a._r,a._g,a._b,a._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&&this._a>=0;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 u(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(v,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(b,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(x,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},u.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:H(e[r]));e=n}return u(e,t)},u.equals=function(e,t){return!(!e||!t)&&u(e).toRgbString()==u(t).toRgbString()},u.random=function(){return u.fromRatio({r:l(),g:l(),b:l()})},u.mix=function(e,t,n){n=0===n?0:n||50;var r=u(e).toRgb(),a=u(t).toRgb(),i=n/100;return u({r:(a.r-r.r)*i+r.r,g:(a.g-r.g)*i+r.g,b:(a.b-r.b)*i+r.b,a:(a.a-r.a)*i+r.a})},

@@ -3,0 +3,0 @@ // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)

{
"name": "three-globe",
"version": "1.0.4",
"version": "1.0.5",
"description": "Globe data visualization as a ThreeJS reusable 3D object",

@@ -5,0 +5,0 @@ "unpkg": "dist/three-globe.min.js",

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