forked from visgl/deck.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60e99cc
commit 5d48b2d
Showing
12 changed files
with
182 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../../.babelrc" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,70 @@ | ||
# deck.gl "Main" Module | ||
|
||
This is an umbrella module for [deck.gl](http://deck.gl/#/) react users. | ||
# deck.gl | ||
|
||
Note: This module is mainly supported for legacy reasons, it just imports and re-exports the `@deck.gl/core`, `@deck.gl/layers` and `@deck.gl/react` modules. | ||
A WebGL2-powered, highly performant framework for large-scale data visualization. | ||
|
||
[API Documentation](http://deck.gl/#/documentation) | ||
|
||
[![docs](http://i.imgur.com/mvfvgf0.jpg)](https://uber.github.io/deck.gl) | ||
|
||
## Installation | ||
|
||
``` | ||
npm install deck.gl | ||
``` | ||
|
||
## Using deck.gl | ||
|
||
deck.gl offers an extensive catalog of pre-packaged visualization "layers", including [ScatterplotLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/scatterplot-layer), [ArcLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/arc-layer), [TextLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/text-layer), [GeoJsonLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/geojson-layer), etc. The input to a layer is usually an array of JSON objects. Each layer offers highly-flexible API to customize how the data should be rendered. | ||
|
||
Example constructing a deck.gl ScatterplotLayer: | ||
|
||
```js | ||
import {ScatterplotLayer} from '@deck.gl/layers'; | ||
|
||
/** | ||
* data is an array of object in the shape of: | ||
* { | ||
* "name":"Montgomery St. (MONT)", | ||
* "address":"598 Market Street, San Francisco CA 94104", | ||
* "entries":"43430", | ||
* "exits":"45128", | ||
* "coordinates":[-122.401407,37.789256] | ||
* } | ||
*/ | ||
const scatterplotLayer = new ScatterplotLayer({ | ||
id: 'bart-stations', | ||
data: 'https://github.com/uber-common/deck.gl-data/blob/master/website/bart-stations.json', | ||
getRadius: d => Math.sqrt(d.entries) / 100, | ||
getPosition: d => d.coordinates, | ||
getColor: [255, 228, 0], | ||
}); | ||
``` | ||
|
||
## Using deck.gl with React | ||
|
||
```js | ||
import DeckGL from 'deck.gl'; | ||
|
||
<DeckGL width="100%" height="100%" longitude={-122.4} latitude={37.78} zoom={8} controller={true} layers={[scatterplotLayer]} /> | ||
``` | ||
|
||
## Using deck.gl with Pure JS | ||
|
||
```js | ||
import {Deck} from '@deck.gl/core'; | ||
|
||
const deck = new Deck({ | ||
container: document.body, | ||
width: '100vw', | ||
height: '100vh', | ||
longitude: -122.4, | ||
latitude: 37.78, | ||
zoom: 8, | ||
controller: true, | ||
layers: [scatterplotLayer] | ||
}); | ||
``` | ||
|
||
|
||
Questions? Submit an issue on our [GitHub page](https://www.github.com/uber/deck.gl/issues). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ | |
"files": [ | ||
"dist", | ||
"deckgl.min.js", | ||
"src" | ||
"src", | ||
"README.md" | ||
], | ||
"scripts": { | ||
"build": "./build.sh", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.