Coder Social home page Coder Social logo

wegiangb / quantized-mesh-viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heremaps/quantized-mesh-viewer

0.0 2.0 0.0 10.55 MB

Render custom quantized mesh tiles in Cesium.js and debug individual tiles using THREE.js renderer.

License: MIT License

Dockerfile 0.51% HTML 5.52% JavaScript 93.96%

quantized-mesh-viewer's Introduction

Quantized Mesh Viewer

Render custom quantized mesh tiles in Cesium and debug individual tiles using THREE.js renderer.

For generation qunatized-mesh tiles from raster you can use the 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.

Cesium map with rendered terrain tiles

To debug individual tile go to http://localhost:8080/tile.html.

Individual terrain tile rendered using THREE.js

On the right panel change the path to the tile and adjust debug parameters.

You can also start the app in a Docker container.

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

Contribute

See CONTRIBUTING.

License

Copyright © 2018 HERE Europe B.V.

See the LICENSE file in the root of this project for license details.

quantized-mesh-viewer's People

Contributors

nicolasneubauer avatar

Watchers

James Cloos avatar Gordon 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.