Skip to content

Commit

Permalink
Add __dirname to glslify transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Ib Green committed Feb 29, 2016
1 parent 8f9078c commit 234bedc
Showing 14 changed files with 486 additions and 193 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"parser": "babel-eslint",
"rules": {
"no-path-concat": 0,
"no-class-assign": 2,
"no-const-assign": 2,
"no-continue": 2,
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# deck.gl

A WebGL overlay suite consists of multiple layers.
A WebGL overlay suite providing of multiple layers.

![screenshot](screenshot.png)

Design goals:
- Enable highly performant WebGL overlays in 2 and 3 dimensions.
- Support efficient WebGl in a data flow architecture application using React.
- Special focus on buffer management, allowing both automatic buffer updates
but also full application control of buffer allocation and management
- Comes with tested, performant layers for basic data visualization use cases.
- Allows easy creation of custom WebGL layers by subclassing `Layer`.


## Installation

```
@@ -172,6 +181,50 @@ renders it as interactive choropleths.
* `unitHeight` [number, optional, default=100] unit height of the bins


## Notes on data and buffer management

deck.gl Layers were designed with data flow architectures like React in mind.

### Data Management with Buffer update callbacks

The `data` property will accept any containers that can be iterated over using
ES6 for-of iteration, this includes e.g. native Arrays, ES6 Sets and Maps,
all Immutable.js containers etc. The notable exception are native JavaScript
object maps. It is recommended to use ES6 Maps instead.

It is recommended, but not required, to use immutable data (containers AND
objects) as it ensures that changes to `data` property trigger a rerender.
(See the notes on `rerenderCount` and `updateCount` properties.)

The layer will expect each object to provide a number of "attributes" that it
can use to set the GL buffers. By default, the layer will look for these
attributes to be available as fields directly on the objects during iteration
over the supplied data set. To gain more control of attribute access and/or
to do on-the-fly calculation of attributes,

#### Manual Buffer Management

For ultimate performance and control of updates, the application can do its
own management of the glbuffers. Each Layer can accept buffers directly as
props.

**Note:** The application can provide some buffers and let others be managed
by the layer. As an example management of the `pickingColors` buffer is
normally left to the layer.

**Note**: A layer only renders when a property change is detected. For
performance reasons, property change detection uses shallow compare,
which means that mutating an element inside a buffer or a mutable data array
does not register as a property change, and thus does not trigger a rerender.
To force trigger a render after mutating buffers, simply increment the
`renderCount` property. To force trigger a buffer update after mutating data,
increment the `updateCount` property.


WebGL layers need to populate typed array buffers
Callbacks will


## Example
```
npm run start
Loading

0 comments on commit 234bedc

Please sign in to comment.