globe.gl 2.33.2 → 2.34.0
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.
- package/README.md +5 -6
- package/dist/globe.gl.d.ts +6 -7
- package/dist/globe.gl.js +47369 -60713
- package/dist/globe.gl.js.map +1 -1
- package/dist/globe.gl.min.js +5 -5
- package/dist/globe.gl.mjs +2 -2
- package/example/airline-routes/highlight-links.html +1 -2
- package/example/airline-routes/us-international-outbound.html +1 -2
- package/example/basic/index.html +2 -3
- package/example/choropleth-countries/index.html +2 -3
- package/example/clouds/index.html +1 -2
- package/example/countries-population/index.html +1 -2
- package/example/custom-globe-styling/index.html +2 -3
- package/example/custom-layer/index.html +1 -2
- package/example/earth-shield/index.html +2 -3
- package/example/earthquakes/index.html +2 -3
- package/example/emit-arcs-on-click/index.html +2 -3
- package/example/heatmap/index.html +2 -3
- package/example/hexed-polygons/index.html +2 -3
- package/example/hollow-globe/index.html +1 -2
- package/example/html-markers/index.html +2 -3
- package/example/moon-landing-sites/index.html +2 -4
- package/example/population-heatmap/index.html +2 -3
- package/example/random-arcs/index.html +2 -3
- package/example/random-paths/index.html +2 -3
- package/example/random-rings/index.html +2 -3
- package/example/satellites/index.html +1 -2
- package/example/solar-terminator/index.html +1 -2
- package/example/submarine-cables/index.html +2 -3
- package/example/tiles/index.html +2 -3
- package/example/volcanoes/index.html +2 -3
- package/example/volcanoes-heatmap/index.html +2 -3
- package/example/world-cities/index.html +2 -3
- package/example/world-population/index.html +1 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -67,8 +67,7 @@ or using a *script* tag
|
|
|
67
67
|
```
|
|
68
68
|
then
|
|
69
69
|
```js
|
|
70
|
-
const myGlobe = Globe()
|
|
71
|
-
myGlobe(myDOMElement)
|
|
70
|
+
const myGlobe = new Globe(myDOMElement)
|
|
72
71
|
.globeImageUrl(myImageUrl)
|
|
73
72
|
.pointsData(myData);
|
|
74
73
|
```
|
|
@@ -97,7 +96,7 @@ myGlobe(myDOMElement)
|
|
|
97
96
|
### Initialisation
|
|
98
97
|
|
|
99
98
|
```js
|
|
100
|
-
Globe({ configOptions })
|
|
99
|
+
new Globe(<domElement>, { configOptions })
|
|
101
100
|
```
|
|
102
101
|
|
|
103
102
|
| Config options | Description | Default |
|
|
@@ -113,14 +112,14 @@ Globe({ configOptions })(<domElement>)
|
|
|
113
112
|
| <b>width</b>([<i>px</i>]) | Getter/setter for the canvas width. | *<window width>* |
|
|
114
113
|
| <b>height</b>([<i>px</i>]) | Getter/setter for the canvas height. | *<window height>* |
|
|
115
114
|
| <b>backgroundColor</b>([<i>str</i>]) | Getter/setter for the background color. | `#000011` |
|
|
116
|
-
| <b>backgroundImageUrl</b>([<i>url</i>]) | Getter/setter for the URL of the image to be used as background to the globe. If no image is provided, the background color is shown instead. | `null` |
|
|
115
|
+
| <b>backgroundImageUrl</b>([<i>url</i>]) | Getter/setter for the URL of the equirectangular projection image to be used as background to the globe. If no image is provided, the background color is shown instead. | `null` |
|
|
117
116
|
|
|
118
117
|
### Globe Layer
|
|
119
118
|
|
|
120
119
|
| Method | Description | Default |
|
|
121
120
|
| --- | --- | :--: |
|
|
122
|
-
| <b>globeImageUrl</b>([<i>url</i>]) | Getter/setter for the URL of the image used in the material that wraps the globe. If no image is provided, the globe is represented as a black sphere. | `null` |
|
|
123
|
-
| <b>bumpImageUrl</b>([<i>url</i>]) | Getter/setter for the URL of the image used to create a [bump map](https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.bumpMap) in the material, to represent the globe's terrain. | `null` |
|
|
121
|
+
| <b>globeImageUrl</b>([<i>url</i>]) | Getter/setter for the URL of the image used in the material that wraps the globe. This image should follow an [equirectangular projection](https://en.wikipedia.org/wiki/Equirectangular_projection). If no image is provided, the globe is represented as a black sphere. | `null` |
|
|
122
|
+
| <b>bumpImageUrl</b>([<i>url</i>]) | Getter/setter for the URL of the image used to create a [bump map](https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.bumpMap) in the material, to represent the globe's terrain. This image should follow an [equirectangular projection](https://en.wikipedia.org/wiki/Equirectangular_projection). | `null` |
|
|
124
123
|
| <b>showGlobe</b>([<i>boolean</i>]) | Getter/setter for whether to show the globe surface itself. | `true` |
|
|
125
124
|
| <b>showGraticules</b>([<i>boolean</i>]) | Getter/setter for whether to show a graticule grid demarking latitude and longitude lines at every 10 degrees. | `false` |
|
|
126
125
|
| <b>showAtmosphere</b>([<i>boolean</i>]) | Getter/setter for whether to show a bright halo surrounding the globe, representing the atmosphere. | `true` |
|
package/dist/globe.gl.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WebGLRendererParameters,
|
|
1
|
+
import { WebGLRendererParameters, Light, Scene, Camera, WebGLRenderer, Object3D } from 'three';
|
|
2
2
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
3
3
|
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
|
|
4
4
|
import { ConfigOptions as ConfigOptions$1, ThreeGlobeGeneric } from 'three-globe';
|
|
@@ -27,9 +27,10 @@ type PointerEventsFilterFn = (object: Object3D, data?: object) => boolean;
|
|
|
27
27
|
// don't surface these internal props from inner ThreeGlobe
|
|
28
28
|
type ExcludedInnerProps = 'setPointOfView' | 'pauseAnimation' | 'resumeAnimation';
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
declare class GlobeGeneric<ChainableInstance>
|
|
31
31
|
extends Omit<ThreeGlobeGeneric<ChainableInstance>, ExcludedInnerProps> {
|
|
32
|
-
(element: HTMLElement)
|
|
32
|
+
constructor(element: HTMLElement, configOptions?: ConfigOptions);
|
|
33
|
+
|
|
33
34
|
resetProps(): ChainableInstance;
|
|
34
35
|
_destructor(): void;
|
|
35
36
|
|
|
@@ -125,8 +126,6 @@ interface GlobeGenericInstance<ChainableInstance>
|
|
|
125
126
|
toGlobeCoords(x: number, y: number): { lat: number, lng: number} | null;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
declare function Globe(configOptions?: ConfigOptions): GlobeInstance;
|
|
129
|
+
declare class Globe extends GlobeGeneric<Globe> {}
|
|
131
130
|
|
|
132
|
-
export { type ConfigOptions,
|
|
131
|
+
export { type ConfigOptions, GlobeGeneric, Globe as default };
|