globe.gl 2.26.9 → 2.26.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,6 +56,7 @@ function _objectSpread2(target) {
56
56
  return target;
57
57
  }
58
58
  function _defineProperty(obj, key, value) {
59
+ key = _toPropertyKey(key);
59
60
  if (key in obj) {
60
61
  Object.defineProperty(obj, key, {
61
62
  value: value,
@@ -120,6 +121,20 @@ function _arrayLikeToArray(arr, len) {
120
121
  function _nonIterableSpread() {
121
122
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
122
123
  }
124
+ function _toPrimitive(input, hint) {
125
+ if (typeof input !== "object" || input === null) return input;
126
+ var prim = input[Symbol.toPrimitive];
127
+ if (prim !== undefined) {
128
+ var res = prim.call(input, hint || "default");
129
+ if (typeof res !== "object") return res;
130
+ throw new TypeError("@@toPrimitive must return a primitive value.");
131
+ }
132
+ return (hint === "string" ? String : Number)(input);
133
+ }
134
+ function _toPropertyKey(arg) {
135
+ var key = _toPrimitive(arg, "string");
136
+ return typeof key === "symbol" ? key : String(key);
137
+ }
123
138
 
124
139
  function linkKapsule (kapsulePropName, kapsuleType) {
125
140
  var dummyK = new kapsuleType(); // To extract defaults
@@ -378,12 +393,8 @@ var globe = Kapsule({
378
393
  setCameraPos(finalGeoCoords);
379
394
  } else {
380
395
  // Avoid rotating more than 180deg longitude
381
- while (curGeoCoords.lng - finalGeoCoords.lng > 180) {
382
- curGeoCoords.lng -= 360;
383
- }
384
- while (curGeoCoords.lng - finalGeoCoords.lng < -180) {
385
- curGeoCoords.lng += 360;
386
- }
396
+ while (curGeoCoords.lng - finalGeoCoords.lng > 180) curGeoCoords.lng -= 360;
397
+ while (curGeoCoords.lng - finalGeoCoords.lng < -180) curGeoCoords.lng += 360;
387
398
  new TWEEN.Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(TWEEN.Easing.Cubic.InOut).onUpdate(setCameraPos).start();
388
399
  }
389
400
  return this;
@@ -15,9 +15,9 @@
15
15
  .backgroundImageUrl('//unpkg.com/three-globe/example/img/night-sky.png')
16
16
  (document.getElementById('globeViz'));
17
17
 
18
- // from https://github.com/telegeography/www.submarinecablemap.com
19
- fetch('//raw.githubusercontent.com/telegeography/www.submarinecablemap.com/master/web/public/api/v3/cable/cable-geo.json')
20
- .then(r =>r.json())
18
+ // from https://www.submarinecablemap.com
19
+ fetch('//api.allorigins.win/get?url=https://www.submarinecablemap.com/api/v3/cable/cable-geo.json')
20
+ .then(r => r.json().then(d => JSON.parse(d.contents)))
21
21
  .then(cablesGeo => {
22
22
  let cablePaths = [];
23
23
  cablesGeo.features.forEach(({ geometry, properties }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "globe.gl",
3
- "version": "2.26.9",
3
+ "version": "2.26.11",
4
4
  "description": "UI component for Globe Data Visualization using ThreeJS/WebGL",
5
5
  "unpkg": "dist/globe.gl.min.js",
6
6
  "jsdelivr": "dist/globe.gl.min.js",
@@ -50,19 +50,19 @@
50
50
  "three-render-objects": "^1.27"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/core": "^7.20.2",
53
+ "@babel/core": "^7.20.7",
54
54
  "@babel/plugin-proposal-class-properties": "^7.18.6",
55
- "@babel/plugin-proposal-object-rest-spread": "^7.20.2",
55
+ "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
56
56
  "@babel/preset-env": "^7.20.2",
57
- "@rollup/plugin-babel": "^6.0.2",
58
- "@rollup/plugin-commonjs": "^23.0.2",
57
+ "@rollup/plugin-babel": "^6.0.3",
58
+ "@rollup/plugin-commonjs": "^24.0.0",
59
59
  "@rollup/plugin-node-resolve": "^15.0.1",
60
- "postcss": "^8.4.18",
60
+ "@rollup/plugin-terser": "^0.2.1",
61
+ "postcss": "^8.4.20",
61
62
  "rimraf": "^3.0.2",
62
- "rollup": "^3.2.5",
63
- "rollup-plugin-dts": "^5.0.0",
63
+ "rollup": "^3.8.1",
64
+ "rollup-plugin-dts": "^5.1.0",
64
65
  "rollup-plugin-postcss": "^4.0.2",
65
- "rollup-plugin-terser": "^7.0.2",
66
- "typescript": "^4.8.4"
66
+ "typescript": "^4.9.4"
67
67
  }
68
68
  }