All Projects → blaze33 → Map33.js

blaze33 / Map33.js

Licence: mit
A JavaScript library to make 3D maps with three.js.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Map33.js

Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (+40.38%)
Mutual labels:  webgl, threejs, 3d-graphics
Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (-12.3%)
Mutual labels:  webgl, threejs, 3d-graphics
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (+36.91%)
Mutual labels:  webgl, threejs, 3d-graphics
React Three Editable
👀 ✏️ Edit your react-three-fiber scene with a visual editor without giving up control over your code.
Stars: ✭ 261 (-17.67%)
Mutual labels:  webgl, threejs
webrays
WebRays - Ray Tracing on the Web
Stars: ✭ 38 (-88.01%)
Mutual labels:  webgl, 3d-graphics
angular-mapboxgl-directive
AngularJS directive for Mapbox GL
Stars: ✭ 43 (-86.44%)
Mutual labels:  webgl, maps
Kusabi
Coding environment 3D graphics with PureScript.
Stars: ✭ 72 (-77.29%)
Mutual labels:  threejs, 3d-graphics
Three Globe
WebGL Globe Data Visualization as a ThreeJS reusable 3D object
Stars: ✭ 270 (-14.83%)
Mutual labels:  webgl, threejs
Dino3d
🦖 Google Chrome T-Rex Run! in 3D (WebGL experiment)
Stars: ✭ 263 (-17.03%)
Mutual labels:  webgl, threejs
Mapssdk Unity
This repository contains samples, documentation, and supporting scripts for Maps SDK, a Microsoft Garage project.
Stars: ✭ 307 (-3.15%)
Mutual labels:  3d-graphics, maps
Maps Pair Programming
Fastest marker render +500k markers
Stars: ✭ 280 (-11.67%)
Mutual labels:  webgl, maps
Cga.js
CGA 3D 计算几何算法库 | 3D Compute Geometry Algorithm Library webgl three.js babylon.js等任何库都可以使用
Stars: ✭ 313 (-1.26%)
Mutual labels:  webgl, threejs
rafagas
Daily geospatial links curated by Raf Roset
Stars: ✭ 17 (-94.64%)
Mutual labels:  maps, cartography
gzweb
Web client for Gazebo classic simulation
Stars: ✭ 36 (-88.64%)
Mutual labels:  threejs, 3d-graphics
3dio Js
JavaScript toolkit for interior apps
Stars: ✭ 255 (-19.56%)
Mutual labels:  webgl, threejs
maps4cim
maps4cim - a real world map generator for CiM 2
Stars: ✭ 21 (-93.38%)
Mutual labels:  maps, cartography
Enable3d
🕹️ Standalone 3D Framework / Physics for three.js (using ammo.js) / 3D extension for Phaser 3
Stars: ✭ 271 (-14.51%)
Mutual labels:  webgl, threejs
Moonrider
🌕🏄🏿 Surf the musical road among the stars. Side project built by two people in a few months to demonstrate WebXR.
Stars: ✭ 292 (-7.89%)
Mutual labels:  webgl, threejs
cim-spec
This repository hosts the specification for the Cartographic Information Model
Stars: ✭ 45 (-85.8%)
Mutual labels:  maps, cartography
rspatial-map-challenge-2020
A list of maps created for #30DayMapChallenge using #rspatial
Stars: ✭ 61 (-80.76%)
Mutual labels:  maps, cartography

map33.js

A JavaScript library to build 3D maps with three.js

npm version

from heightmap to 3D terrain

Live demo (you can double click to add missing tiles)

Installation

npm install map33

alternatively:

yarn add map33

Presentation and Usage

Map33.js takes two slippy map tilesets, one to fetch elevation data tiles, the other to texture the meshes built from said elevation data (any XYZ tileserver will do).

Live demo (you can double click to add missing tiles)

import { Map, Source, MapPicker } from 'map33' // import Map as Map33 if you use the default Map object.

const position = [45.916216, 6.860973]
const source = new Source('maptiler', '<your_maptiler_token>')
const map = new Map(scene, camera, source, position, {nTiles: 3, zoom: 11})
const mapPicker = new MapPicker(camera, map, renderer.domElement)
mapPicker.go(-45, 128)

Source class

Defines a tileset source used to fetch textures applied to the 3D terrain mesh.

const source = new Source(api, token)
Argument Description Default Value
api One of ['osm', 'mapbox', 'eox', 'maptiler'] -
token Your api key when using mapbox or maptiler -

Map class

The main class of map33.js. Creates a 3D map using a grid of tiles.

const map = new Map(scene, camera, source, position, options)
Argument Description Default Value
scene A three.js Scene instance -
camera A three.js Camera instance -
source A map33.js Source instance -
position An array containing the latitude and longitude values used to center the map -
options An object to pass some options {}

The options schema is defined as follow:

Option Description Default Value
nTiles Map.init() will display a grid of nTiles x nTiles 3
zoom Default zoom level 11
tileSize Tile size at the default zoom level 600
tileSegments Number of segments given to the PlaneBufferGeometry constructor. Maximum value is 256 100
zScale The raw elevation data is multiplied by zScale when building a Tile mesh 0.045

Background

Long story short, I took what I liked most about droneWorld (cf. https://discourse.threejs.org/t/3d-world-engine-droneworld-prototype/1501), ie. making 3D terrain and started from scratch to build a library that, hopefully, will be much cleaner in order to build upon and reuse.

Interesting references:

https://github.com/w3reality/three-geo

https://blog.mapbox.com/bringing-3d-terrain-to-the-browser-with-three-js-410068138357

License and attributions

The map library code is MIT licensed.

InfiniteGridHelper.js used by the example is made by Fyrestar (Github repo)


This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].