react-globe.gl 2.35.0 → 2.37.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
@@ -138,6 +138,10 @@ ReactDOM.render(
138
138
  | <b>onGlobeClick</b> | <i>func</i> | *-* | Callback function for (left-button) clicks on the globe. The clicked globe coordinates and the event object are included as arguments: `onGlobeClick({ lat, lng }, event)`. |
139
139
  | <b>onGlobeRightClick</b> | <i>func</i> | *-* | Callback function for right-clicks on the globe. The clicked globe coordinates and the event object are included as arguments: `onGlobeRightClick({ lat, lng }, event)`. |
140
140
 
141
+ | Method | Arguments | Description |
142
+ | --- | :--: | --- |
143
+ | <b>globeTileEngineClearCache</b> | *-* | Clear the tile engine cache. |
144
+
141
145
  ### Points Layer
142
146
 
143
147
  <p align="center">
@@ -457,6 +461,7 @@ ReactDOM.render(
457
461
  | <b>enablePointerInteraction</b> | <i>bool</i> | `true` | Whether to enable the mouse tracking events. This activates an internal tracker of the canvas mouse position and enables the functionality of object hover/click and tooltip labels, at the cost of performance. If you're looking for maximum gain in your globe performance it's recommended to switch off this property. |
458
462
  | <b>pointerEventsFilter</b> | <i>func</i> | `() => true` | Filter function which defines whether a particular object can be the target of pointer interactions. In general, objects that are closer to the camera get precedence in capturing pointer events. This function allows having ignored object layers so that pointer events can be passed through to deeper objects in the various globe layers. The ThreeJS object and its associated data (if any) are passed as arguments: `pointerEventsFilter(obj, data)`. The function should return a boolean value. |
459
463
  | <b>lineHoverPrecision</b> | <i>number</i> | 0.2 | Precision to use when detecting hover events over [Line](https://threejs.org/docs/#api/objects/Line) and [Points](https://threejs.org/docs/#api/objects/Points) objects, such as arcs, paths or particles. |
464
+ | <b>showPointerCursor</b> | <i>bool</i> or <i>func</i> | `true` | Whether to show a pointer cursor when hovering over clickable portions of the globe. Accepts either a `boolean` constant or a callback function which receives the object (type and data) currently under the cursor and is expected to return a `boolean` value. |
460
465
 
461
466
  | Method | Arguments | Description |
462
467
  | --- | :--: | --- |
@@ -286,6 +286,7 @@ interface GlobeProps extends ConfigOptions {
286
286
  enablePointerInteraction?: boolean;
287
287
  pointerEventsFilter?: (object: Object3D, data?: object) => boolean;
288
288
  lineHoverPrecision?: number;
289
+ showPointerCursor?: boolean | ((objType: string, objData: object) => boolean);
289
290
  onZoom?: (pov: GeoCoords) => void;
290
291
  }
291
292
 
@@ -309,6 +310,9 @@ interface GlobeMethods {
309
310
  getScreenCoords(lat: number, lng: number, altitude?: number): ScreenCoords;
310
311
  toGeoCoords(coords: CartesianCoords): GeoCoords;
311
312
  toGlobeCoords(x: number, y: number): { lat: number, lng: number} | null;
313
+
314
+ // Other
315
+ globeTileEngineClearCache(): GlobeInstance;
312
316
  }
313
317
 
314
318
  type FCwithRef<P = {}, R = {}> = React.FunctionComponent<P & { ref?: React.MutableRefObject<R | undefined> }>;