globe.gl 2.33.1 → 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 +6 -7
- package/dist/globe.gl.d.ts +5 -6
- package/dist/globe.gl.js +58759 -71147
- package/dist/globe.gl.js.map +1 -1
- package/dist/globe.gl.min.js +5 -5
- 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 +3 -4
- 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 +9 -9
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` |
|
|
@@ -244,7 +243,7 @@ Globe({ configOptions })(<domElement>)
|
|
|
244
243
|
| <b>heatmapPointLat</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Heatmap point object accessor function, attribute or a numeric constant for the latitude coordinate. | `arr => arr[0]` |
|
|
245
244
|
| <b>heatmapPointLng</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Heatmap point object accessor function, attribute or a numeric constant for the longitude coordinate. | `arr => arr[1]` |
|
|
246
245
|
| <b>heatmapPointWeight</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Heatmap point object accessor function, attribute or a numeric constant for the weight of the point. The weight of a point determines its influence on the density of the surrounding area. | 1 |
|
|
247
|
-
| <b>heatmapBandwidth</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Heatmap object accessor function, attribute or a numeric constant for the heatmap bandwidth, in angular degrees. The bandwidth is an internal parameter of the [Gaussian kernel function](https://en.wikipedia.org/wiki/Gaussian_function) and defines how localized is the influence of a point on distant locations. A narrow bandwidth leads to a more spiky representation, while a broad one has smoother curves. |
|
|
246
|
+
| <b>heatmapBandwidth</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Heatmap object accessor function, attribute or a numeric constant for the heatmap bandwidth, in angular degrees. The bandwidth is an internal parameter of the [Gaussian kernel function](https://en.wikipedia.org/wiki/Gaussian_function) and defines how localized is the influence of a point on distant locations. A narrow bandwidth leads to a more spiky representation, while a broad one has smoother curves. | 2.5 |
|
|
248
247
|
| <b>heatmapColorFn</b>([<i>str</i> or <i>fn</i>]) | Heatmap object accessor function or attribute for the color interpolator function to represent density in the heatmap. This function should receive a number between `0` and `1` (or potentially higher if saturation > 1), and return a color string. | [Turbo colormap](https://blog.research.google/2019/08/turbo-improved-rainbow-colormap-for.html) interpolator with fading opacity |
|
|
249
248
|
| <b>heatmapColorSaturation</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Heatmap object accessor function, attribute or a numeric constant for the color scale saturation. The saturation is a multiplier of the normalized density value (`[0,1]`) before passing it to the color interpolation function. It can be used to dampen outlier peaks in density and bring the data floor into view. | 1.5 |
|
|
250
249
|
| <b>heatmapBaseAltitude</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Heatmap object accessor function, attribute or a numeric constant for the heatmap base floor altitude in terms of globe radius units (`0` = 0 altitude, `1` = globe radius). | 0.01 |
|
package/dist/globe.gl.d.ts
CHANGED
|
@@ -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 };
|