MCPcopy Index your code
hub / github.com/djzielin/babylonjs-mapping

github.com/djzielin/babylonjs-mapping @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
562 symbols 1,028 edges 115 files 12 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.setRasterProvider(new RasterOSM(this.ourTS)); //set basemap to pull from Open Street Maps
    this.ourTS.createGeometry(new Vector2(4,4), 20, 2); //4x4 tile set, 20m width of each tile, and 2 divisions on each tile
    this.ourTS.updateRaster(35.2258461, -80.8400777, 16); //lat, lon, zoom. takes us to charlotte. 

    this.ourOSM=new BuildingsOSM(this.ourTS); //lets pull building footprints from Open Street Map Buildings
    this.ourOSM.accessToken=accessToken;      //now requires Auth token
    this.ourOSM.generateBuildings();

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

Tested with: Node 20.10.0 LTS

Extension points exported contracts — how you extend this code

propertiesCharlotte (Interface)
(no doc)
examples-local/local-load/src/index.ts
propertiesCharlotte (Interface)
(no doc)
examples-local/multisource/src/index.ts
TileRequest (Interface)
(no doc)
lib/TileSet.d.ts
BuildingRequest (Interface)
(no doc)
lib/Buildings.d.ts
LineSegment (Interface)
(no doc)
lib/TileBuilding.d.ts
topLevel (Interface)
(no doc)
lib/GeoJSON.d.ts
BuildingRequest (Interface)
(no doc)
src/Buildings.ts
TileRequest (Interface)
(no doc)
src/TileSet.ts

Core symbols most depended-on inside this repo

prettyName
called by 26
src/TileSet.ts
prettyName
called by 20
lib/Buildings.js
removePendingRequest
called by 18
lib/Buildings.js
prettyName
called by 18
defunct/lib_playground/Buildings.js
prettyName
called by 13
defunct/lib_playground/TileSet.js
setRasterProvider
called by 12
lib/TileSet.js
print
called by 11
examples-local/math-test/src/index.ts
createGeometry
called by 11
lib/TileSet.js

Shape

Method 375
Class 128
Interface 34
Function 15
Enum 10

Languages

TypeScript100%

Modules by API surface

src/TileMath.ts30 symbols
lib/TileMath.js29 symbols
src/TileSet.ts21 symbols
src/GeoJSON.ts20 symbols
lib/TileSet.js17 symbols
defunct/lib_playground/TileSet.js16 symbols
src/Buildings.ts15 symbols
defunct/lib_playground/TileMath.js15 symbols
defunct/lib_playground/MapBox.js15 symbols
src/TerrainMB.ts14 symbols
lib/TerrainMB.js14 symbols
src/TileBuilding.ts13 symbols

For agents

$ claude mcp add babylonjs-mapping \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact