• Stars
    star
    1,238
  • Rank 37,770 (Top 0.8 %)
  • Language
    JavaScript
  • License
    Mozilla Public Li...
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mobile-first 3D mapping engine with emphasis on user experience

procedural-gl.js

Procedural GL JS is a library for creating 3D map experiences on the web, written in JavaScript and WebGL. It is built on top of THREE.js.

It provides an easy-to-use, but powerful framework to allow beautiful landscapes of the outdoors to be embedded into web pages. It loads super-fast and is optimized for mobile devices.

Demo | Docs | Overlay playground | Elevation data | Source

Key features

  • Novel GPU powered level-of-detail system gives butter-smooth rendering, including on mobile
  • Stream in standard raster imagery tiles. Supports map tiles from a variety of providers
  • Easily include elevation data for 3D terrain
  • Powerful overlay capabilities. Draw crisp markers and lines
  • Well-thought-out API, complex applications can be built without needing to deal with 3D concepts
  • Great UX and intuitive controls, mouse-based on desktop & touch-based on mobile
  • Tiny filesize means library is parsed fast. Package size is less than THREE.js thanks to code stripping

Screenshots

Install

npm install procedural-gl

Usage

import Procedural from 'procedural-gl';

// Choose a DOM element into which the library should render
const container = document.getElementById( 'container' );

// Configure datasources
const datasource = {
  provider: 'maptiler',
  // To get a free key, use https://cloud.maptiler.com/account/?ref=procedural
  apiKey: 'GET_AN_API_KEY_FROM_MAPTILER'
};

// Initialize library and optionally add UI controls
Procedural.init( { container, datasource } );
Procedural.setRotationControlVisible( true );

// Load real-world location
const montBlanc = { latitude: 45.8326364, longitude: 6.8564201 };
Procedural.displayLocation( montBlanc );

Connecting to a datasource

To actually load data using a library you will need to connect to a source of data. The quickest way to get setup is to register for a free account with MapTiler and then use the API key as shown above.

For detailed instructions for setting up the datasource, see this page in the wiki

Examples

Sponsor

If this library is useful to you, please consider sponsoring the project.

Blog posts / Guides

License

Procedural GL JS is licensed under the Mozilla Public License Version 2.0.

More Repositories

1

android-visualizer

Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp
Java
804
star
2

lod-terrain

WebGL terrain with seamlessly changing level of detail
JavaScript
441
star
3

procedural-gl-react

React component for the Procedural GL JS library
JavaScript
345
star
4

go_images

Example code for generating images in Go
Go
120
star
5

amd-three.js

AMD + three.js example application layout
JavaScript
86
star
6

peaks-of-austria

Explore the peaks of Austria in 3D - powered by Procedural GL JS
JavaScript
59
star
7

new-zealand-3d

Explore New Zealand in 3D - powered by Procedural GL JS
JavaScript
48
star
8

glsl-validator

Command line tool for validating GLSL files
Python
32
star
9

photo.gl

Example of 2D image processing using JavaScript, WebGL & GLSL
HTML
22
star
10

Cherrola

An aggressive Pomodoro timer for OSX
Objective-C
20
star
11

tron.js

Tron game written in WebGL/THREE.js for future.js 2014 workshop
JavaScript
14
star
12

volcanoes-of-japan

Explore the volcanoes of Japan in 3D - powered by Procedural GL JS
JavaScript
14
star
13

safari-webgl

Rendering of Safari logo using WebGL
JavaScript
12
star
14

webgl-tombstone

Demo combining canvas drawing and webgl shaders
JavaScript
10
star
15

procedural-gl-react-example

Example implementation of the Procedural GL React component
JavaScript
6
star
16

googleTV-hackathon

Project built at Google TV hackathon
Java
6
star
17

tetris.gl

Example of implementing tetris-like simulation on the GPU using WebGL
JavaScript
3
star
18

att-hackathon

JavaScript
3
star
19

vim

Vim Script
2
star
20

terrajs-slides

Terra.js slides
1
star
21

render-2-texture

Demo of bug in iOS WebGL when rendering to a floating point texture
JavaScript
1
star
22

tmux-tools

Collection of useful utilities built on tmux
Shell
1
star