https://github.com/heremaps/quantized-mesh-viewer
Render custom quantized mesh tiles in Cesium.js and debug individual tiles using THREE.js renderer.
https://github.com/heremaps/quantized-mesh-viewer
3d 3d-terrain cesium-terrain cesiumjs quantized-mesh terrain three-js
Last synced: 5 months ago
JSON representation
Render custom quantized mesh tiles in Cesium.js and debug individual tiles using THREE.js renderer.
- Host: GitHub
- URL: https://github.com/heremaps/quantized-mesh-viewer
- Owner: heremaps
- License: mit
- Created: 2018-08-23T13:27:01.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-05T09:42:13.000Z (over 6 years ago)
- Last Synced: 2024-11-23T12:23:41.363Z (6 months ago)
- Topics: 3d, 3d-terrain, cesium-terrain, cesiumjs, quantized-mesh, terrain, three-js
- Language: JavaScript
- Homepage:
- Size: 10.3 MB
- Stars: 185
- Watchers: 16
- Forks: 47
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Quantized Mesh Viewer
===========================Render custom [quantized mesh](https://github.com/AnalyticalGraphicsInc/quantized-mesh) tiles in Cesium and debug individual tiles using THREE.js renderer.
For generation quantized-mesh tiles from raster you can use the [heremaps/tin-terrain](https://github.com/heremaps/tin-terrain) tool.
Note: This is experimental code, expect changes.
### Run
```
npm i
npm start
```
At *http://localhost:8080* you'll see a Cesium map with example terrain tiles.
To debug individual tile go to *http://localhost:8080/tile.html*.

On the right panel change the path to the tile and adjust debug parameters.
You can also start the app in a Docker container.
```bash
docker build -t qm-viewer .
docker run -t -i --name qm-viewer -p 8080:8080 -v $(pwd):/usr/src/app qm-viewer
```### Custom Tiles
By default application renders example tiles from `./example-tiles` folder. To serve files from different location customize `SurfaceProvider` parameters in the `./src/map/index.js`.
Application serves statics from its whole root directory so you can put folder with custom tiles next to the `./example-tiles` folder.
### Configuring `SurfaceProvider`
```
new SurfaceProvider(options)
```Options:
* getUrl: (x: Number, y: Number, level: Number) → String
Required
Constructs URL to fetch a tile using provided grid coordinates.
* tilingScheme: Cesium.TilingScheme
Optional
Default — Cesium.WebMercatorTilingScheme
* credit: [Cesium.Credit]
Optional
Credits for a tiles data### Notes
- Cesium cannot render tiles for a specific zoom level unless you provide tiles for all parent level. The `SurfaceProvider` mocks missing tiles with a plane geometry.
### Links
* [Quantized Mesh Decoder](https://github.com/heremaps/quantized-mesh-decoder)
* [Quantized Mesh Format Specification](https://github.com/AnalyticalGraphicsInc/quantized-mesh)### Contribute
See [CONTRIBUTING](./CONTRIBUTING.md).
### License
Copyright © 2018 HERE Europe B.V.
See the [LICENSE](LICENSE) file in the root of this project for license details.