react-globe.gl 2.31.3 → 2.33.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 +2 -0
- package/dist/react-globe.gl.d.ts +2 -0
- package/dist/react-globe.gl.js +58752 -40485
- package/dist/react-globe.gl.js.map +1 -1
- package/dist/react-globe.gl.min.js +4 -4
- package/dist/react-globe.gl.mjs +2 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -105,6 +105,7 @@ ReactDOM.render(
|
|
|
105
105
|
| --- | :--: | :--: | --- |
|
|
106
106
|
| <b>width</b> | <i>number</i> | *<window width>* | Canvas width. |
|
|
107
107
|
| <b>height</b> | <i>number</i> | *<window height>* | Canvas height. |
|
|
108
|
+
| <b>globeOffset</b> | <i>[number, number]</i> | `[0, 0]` | Position offset of the globe relative to the canvas center. |
|
|
108
109
|
| <b>backgroundColor</b> | <i>string</i> | `#000011` | Background color. |
|
|
109
110
|
| <b>backgroundImageUrl</b> | <i>string</i> | *-* | URL of the image to be used as background to the globe. If no image is provided, the background color is shown instead. |
|
|
110
111
|
| <b>waitForGlobeReady</b> | <i>bool</i> | `true` | Whether to wait until the globe wrapping or background image has been fully loaded before rendering the globe or any of the data layers. |
|
|
@@ -401,6 +402,7 @@ ReactDOM.render(
|
|
|
401
402
|
| <b>htmlLng</b> | <i>number</i>, <i>string</i> or <i>func</i> | `lng` | HTML element accessor function, attribute or a numeric constant for the longitude coordinate of the element's central position. |
|
|
402
403
|
| <b>htmlAltitude</b> | <i>number</i>, <i>string</i> or <i>func</i> | 0 | HTML element accessor function, attribute or a numeric constant for the altitude coordinate of the element's position, in terms of globe radius units. |
|
|
403
404
|
| <b>htmlElement</b> | <i>string</i> or <i>func</i> | `null` | Accessor function or attribute to retrieve the DOM element to use. Should return an instance of [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement). |
|
|
405
|
+
| <b>htmlElementVisibilityModifier</b> | <i>func(elem, isVisible)</i> | - | Custom function that defines how elements are shown/hidden according to whether they are in front or behind the globe. The function receives two arguments `(elem, isVisible)`, the HTML element and a boolean indicating if the element should be visible. By default the Three object itself is automatically hidden when behind the globe. |
|
|
404
406
|
| <b>htmlTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate HTML elements position changes. A value of `0` will move the elements immediately to their final position. |
|
|
405
407
|
|
|
406
408
|
### 3D Objects Layer
|
package/dist/react-globe.gl.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ interface GlobeProps extends ConfigOptions {
|
|
|
46
46
|
// Container layout
|
|
47
47
|
width?: number;
|
|
48
48
|
height?: number;
|
|
49
|
+
globeOffset?: [number, number];
|
|
49
50
|
backgroundColor?: string;
|
|
50
51
|
backgroundImageUrl?: string | null;
|
|
51
52
|
|
|
@@ -253,6 +254,7 @@ interface GlobeProps extends ConfigOptions {
|
|
|
253
254
|
htmlLng?: ObjAccessor<number>;
|
|
254
255
|
htmlAltitude?: ObjAccessor<number>;
|
|
255
256
|
htmlElement?: string | ((d: object) => HTMLElement);
|
|
257
|
+
htmlElementVisibilityModifier?: (el: HTMLElement, isVisible: boolean) => void;
|
|
256
258
|
htmlTransitionDuration?: number;
|
|
257
259
|
|
|
258
260
|
// 3D Objects layer
|