globe.gl 2.39.7 → 2.41.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 CHANGED
@@ -113,6 +113,7 @@ new Globe(<domElement>, { configOptions })
113
113
  | --- | --- | :--: |
114
114
  | <b>width</b>([<i>px</i>]) | Getter/setter for the canvas width. | *&lt;window width&gt;* |
115
115
  | <b>height</b>([<i>px</i>]) | Getter/setter for the canvas height. | *&lt;window height&gt;* |
116
+ | <b>globeOffset</b>([<i>[px, px]</i>]) | Getter/setter for the position offset of the globe relative to the canvas center. | `[0, 0]` |
116
117
  | <b>backgroundColor</b>([<i>str</i>]) | Getter/setter for the background color. | `#000011` |
117
118
  | <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` |
118
119
 
@@ -407,6 +408,7 @@ new Globe(<domElement>, { configOptions })
407
408
  | <b>htmlLng</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | HTML element accessor function, attribute or a numeric constant for the longitude coordinate of the element's central position. | `lng` |
408
409
  | <b>htmlAltitude</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | HTML element accessor function, attribute or a numeric constant for the altitude coordinate of the element's position, in terms of globe radius units. | 0 |
409
410
  | <b>htmlElement</b>([<i>str</i> or <i>fn</i>]) | 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). | `null` |
411
+ | <b>htmlElementVisibilityModifier</b>([<i>fn(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. | - |
410
412
  | <b>htmlTransitionDuration</b>([<i>num</i>]) | Getter/setter for duration (ms) of the transition to animate HTML elements position changes. A value of `0` will move the elements immediately to their final position. | 1000 |
411
413
 
412
414
  ### 3D Objects Layer
@@ -40,6 +40,8 @@ interface GlobeGenericInstance<ChainableInstance>
40
40
  width(width: number): ChainableInstance;
41
41
  height(): number;
42
42
  height(height: number): ChainableInstance;
43
+ globeOffset(): [number, number];
44
+ globeOffset(offset: [number, number]): ChainableInstance;
43
45
  backgroundColor(): string;
44
46
  backgroundColor(color: string): ChainableInstance;
45
47
  backgroundImageUrl(): string | null;