Giter Site home page Giter Site logo

lp249839965 / procedural-gl-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from felixpalmer/procedural-gl-js

0.0 0.0 0.0 3.23 MB

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

Home Page: https://felixpalmer.github.io/procedural-gl-js/

License: Mozilla Public License 2.0

JavaScript 98.29% HTML 0.21% GLSL 1.35% Shell 0.07% CSS 0.06% Python 0.02%

procedural-gl-js's Introduction

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. Global 3D data integration via nasadem.XYZ
  • 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 = {
  elevation: {
    apiKey: 'GET_AN_API_KEY_FROM_www.nasadem.xyz'
  },
  imagery: {
    apiKey: 'GET_AN_API_KEY_FROM_YOUR_IMAGERY_PROVIDER',
    urlFormat: 'https://imagery.example.com/tiles/{z}/{x}/{y}.jpg?key={apiKey}',
    attribution: 'Imagery attribution'
  },
};

// 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 );

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

Examples

Blog posts / Guides

License

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

procedural-gl-js's People

Contributors

felixpalmer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.