react-globe.gl 2.26.0 → 2.27.1

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
@@ -426,7 +426,8 @@ ReactDOM.render(
426
426
  | <b>pointOfView</b> | { <i>lat</i>, <i>lng</i>, <i>altitude</i> } [,<i>ms</i>=`0`] | By default the camera will aim at the cross between the equator and the prime meridian (`0,0` coordinates), at an altitude of `2.5` globe radii. | Camera position, in terms of geographical `lat`, `lng`, `altitude` coordinates. Each of the coordinates is optional, allowing for motion in just some direction. The 2nd optional argument defines the duration of the transition (in ms) to animate the camera motion. A value of 0 (default) moves the camera immediately to the final position. |
427
427
  | <b>pauseAnimation</b>| *-* |Pauses the rendering cycle of the component, effectively freezing the current view and cancelling all user interaction. This method can be used to save performance in circumstances when a static image is sufficient. |
428
428
  | <b>resumeAnimation</b>| *-* |Resumes the rendering cycle of the component, and re-enables the user interaction. This method can be used together with `pauseAnimation` for performance optimization purposes. |
429
- | <b>onZoom</b> | <i>func</i> | *-* | Callback function for point-of-view changes by zooming or rotating the globe using the orbit controls. The current point of view (with the syntax `{ lat, lng, altitude }`) is included as sole argument. |
429
+ | <b>onZoom</b> | <i>func</i> | Callback function for point-of-view changes by zooming or rotating the globe using the orbit controls. The current point of view (with the syntax `{ lat, lng, altitude }`) is included as sole argument. |
430
+ | <b>lights</b> | <i>array</i> | Getter/setter for the list of lights to use in the scene. Each item should be an instance of [Light](https://threejs.org/docs/#api/en/lights/Light). |
430
431
  | <b>scene</b>| *-* |Access the internal ThreeJS [Scene](https://threejs.org/docs/#api/scenes/Scene). Can be used to extend the current scene with additional objects not related to globe.gl. |
431
432
  | <b>camera</b>| *-* |Access the internal ThreeJS [Camera](https://threejs.org/docs/#api/cameras/PerspectiveCamera). |
432
433
  | <b>renderer</b>| *-* |Access the internal ThreeJS [WebGL renderer](https://threejs.org/docs/#api/renderers/WebGLRenderer). |
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Material, Object3D, Scene, Camera, WebGLRenderer } from 'three';
2
+ import { Material, Object3D, Light, Scene, Camera, WebGLRenderer } from 'three';
3
3
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
4
4
  import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
5
5
  import { ConfigOptions, GlobeInstance } from 'globe.gl';
@@ -272,6 +272,8 @@ interface GlobeMethods {
272
272
  pointOfView(pov: { lat?: number, lng?: number, altitude?: number }, transitionMs?: number): GlobeInstance;
273
273
  pauseAnimation(): GlobeInstance;
274
274
  resumeAnimation(): GlobeInstance;
275
+ lights(): Light[];
276
+ lights(lights: Light[]): GlobeInstance;
275
277
  scene(): Scene;
276
278
  camera(): Camera;
277
279
  renderer(): WebGLRenderer;