0.1.2 • Published 7 years ago
react-earth v0.1.2
React Earth
This is a package to display an Earth via a React component.

Installation
Install with npm:
npm install react-earthOr yarn:
yarn add react-earthUsage
import ReactEarth from 'react-earth';
const App = () => {
return (
<ReactEarth />
);
};List of (all optional) props is as follows:
width- the width of the canvas.height- the height of the canvas.speed- indicates the speed the globe should rotate at. 0 indicates no rotation. You can specify a negative rotation to rotate it backwards.className- a class name to pass to the containing divshowCloud- whether to show clouds or nottextures- an object of custom textures to pass to the globetextures.map- the main texture of the globetextures.bumpMap- a bump map to give the globe some texturetextures.specular- a specular map to give the globe some reflectivitytextures.cloud- a cloud map to overlay on the globebumpScale- the amount of extrusion for the bump mapcloudOpacity- the amount of opacity for the cloud layercities- a list of objects containinglatandlngpoints to displaycitySize- the size of the cityonCityMouseOver- a callback function when hovering over a cityonCityMouseOut- a callback function when stopping hovering over a city
Inspired by this great tutorial.