WorldWindEarth / worldwind-react-globe

A React component for interacting with the Web WorldWind virtual globe SDK from NASA and ESA
https://worldwind.earth/worldwind-react-globe/
MIT License
42 stars 19 forks source link

Attach a Globe to an existing canvas #3

Closed emxsys closed 6 years ago

emxsys commented 6 years ago

Add the capability to attach the Globe to existing canvas if a canvas' element ID is supplied as a property.

emxsys commented 6 years ago

Example using an existing canvas element with the Globe canvasId props.

  render() {
    return (
        <div className="fullscreen" >
            <canvas id="test"></canvas>
            <Globe canvasId="test"/>
        </div>
    )
  }