globe.gl 2.24.0 → 2.24.1

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.
Binary file
@@ -0,0 +1,42 @@
1
+ <head>
2
+ <style> body { margin: 0; } </style>
3
+
4
+ <script src="//unpkg.com/three"></script>
5
+
6
+ <script src="//unpkg.com/globe.gl"></script>
7
+ <!--<script src="../../dist/globe.gl.js"></script>-->
8
+ </head>
9
+
10
+ <body>
11
+ <div id="globeViz"></div>
12
+
13
+ <script>
14
+ const world = Globe({ animateIn: false })
15
+ (document.getElementById('globeViz'))
16
+ .globeImageUrl('//unpkg.com/three-globe/example/img/earth-blue-marble.jpg')
17
+ .bumpImageUrl('//unpkg.com/three-globe/example/img/earth-topology.png');
18
+
19
+ // Auto-rotate
20
+ world.controls().autoRotate = true;
21
+ world.controls().autoRotateSpeed = 0.35;
22
+
23
+ // Add clouds sphere
24
+ const GLOBE_RADIUS = 100;
25
+ const CLOUDS_IMG_URL = './clouds.png'; // from https://github.com/turban/webgl-earth
26
+ const CLOUDS_ALT = 0.004;
27
+ const CLOUDS_ROTATION_SPEED = -0.006; // deg/frame
28
+
29
+ new THREE.TextureLoader().load(CLOUDS_IMG_URL, cloudsTexture => {
30
+ const clouds = new THREE.Mesh(
31
+ new THREE.SphereBufferGeometry(GLOBE_RADIUS * (1 + CLOUDS_ALT), 75, 75),
32
+ new THREE.MeshPhongMaterial({ map: cloudsTexture, transparent: true })
33
+ );
34
+ world.scene().add(clouds);
35
+
36
+ (function rotateClouds() {
37
+ clouds.rotation.y += CLOUDS_ROTATION_SPEED * Math.PI / 180;
38
+ requestAnimationFrame(rotateClouds);
39
+ })();
40
+ });
41
+ </script>
42
+ </body>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "globe.gl",
3
- "version": "2.24.0",
3
+ "version": "2.24.1",
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",
@@ -56,7 +56,7 @@
56
56
  "@rollup/plugin-node-resolve": "^13.1.2",
57
57
  "postcss": "^8.4.5",
58
58
  "rimraf": "^3.0.2",
59
- "rollup": "^2.62.0",
59
+ "rollup": "^2.63.0",
60
60
  "rollup-plugin-dts": "^4.1.0",
61
61
  "rollup-plugin-postcss": "^4.0.2",
62
62
  "rollup-plugin-terser": "^7.0.2",