- Layer Browser (Main Example) - The Layer Browser enables testing of props for all core layers and many sample layers. This is the main example used for testing layers during development of deck.gl.
A number of sample layers are available in examples/sample-layers
. These can
be copied into your app and extended/modified as needed.
- Hello World (webpack2): Bundles a minimal app with webpack 2 and serves it with webpack-dev-server. Transpiles with buble.
- Hello World (browserify) Bundles a minimal app with browserify and serves it with budo. Transpiles with babel.
- Tree Shaking: Bundles a minimal app with webpack 2 and provides various analysis scripts to measure the size of the resulting bundle.
As usual, you can install the dependencies either using yarn
or with npm install
.
(yarn
installs faster, but is not required). npm start
will run build and
run the example (and hot reload any source code changes).
Note that many of the comments in the "Getting Started" section of deck.gl documentation also applies when building and running the examples.
These examples all contain the same simple, minimial deck.gl application, bundled by different javascript bundling tools.
These examples are intended to give you a minimal working example to build off.
The goal is to demonstrate the smallest working package.json
and configuration file settings for each bundler, removing all non-essential
dependencies and configuration, showing you exactly what is needed to get
started with deck.gl.
Although the interface might be slightly different, the result should be
exactly the same, i.e. an interactive dark map you can move and tilt with a
deck.gl LineLayer
showing one line.
Note that several examples are set up so that they can be run either against the local source code (enabling debugging of deck.gl with hot reloading) or against an installed version of deck.gl (enabling testing that things work with the published version).
Examples that support this mode have a 'start-local' script in their
package.json
Look at the webpack.config.local.js
in this directory for details.