babylonjs-mapping
TypeScript icon, indicating that this package has built-in type declarations

1.1.24 • Public • Published

babylonjs-mapping

This project is to help do mapping inside BabylonJS.

Currently supported data sources include:

  • OpenStreetMaps and OpenStreetMaps Buildings lots of gray buildings on top of map of roads
  • Mapbox (satellite and terrain) grand canyon with river at bottom
  • Custom Buildings from GeoServer and ArcGIS Online (WFS)

The "Hello World" of creating an OpenStreetMap tileset, along with extruded buildings is:

this.ourTS = new TileSet(this.scene,this.engine);
this.ourTS.createGeometry(new Vector2(4,4), 20, 2);
this.ourTS.setRasterProvider("OSM");
this.ourTS.updateRaster(35.2258461, -80.8400777, 16); //charlotte

this.ourOSM=new BuildingsOSM(this.ourTS);
this.ourOSM.doMerge=true; //merge all buildings on a tile
this.ourOSM.exaggeration=3;
this.ourOSM.generateBuildings();

Live Demos! https://people.duke.edu/~djzielin/babylonjs-mapping/HelloWorld/

Tested with: Node 20.10.0 LTS

Package Sidebar

Install

npm i babylonjs-mapping

Weekly Downloads

15

Version

1.1.24

License

MIT

Unpacked Size

271 kB

Total Files

65

Last publish

Collaborators

  • djzielin
  • kgong20