Last active
May 6, 2021 23:59
-
-
Save bertt/9b4ef34db57f615be369236ace74e543 to your computer and use it in GitHub Desktop.
Cesium + custom terrains
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1OGUyODEwNC03YTIzLTRjMmItOTk4Ni1iZWNkNGE1MWZhMTkiLCJpZCI6NTQzLCJpYXQiOjE1MjUyNzM4OTd9.F2r6H2XRAcnkHjkFgXAzDieW6TeIxDhTZ5hdikd-_Q8'; | |
var viewer = new Cesium.Viewer('cesiumContainer', { | |
terrainExaggeration : 10.0 | |
}); | |
var terrainProvider = new Cesium.CesiumTerrainProvider({ | |
url : '/tilesets/tiles' | |
}); | |
viewer.scene.terrainProvider = terrainProvider; | |
// zoom to texel... | |
viewer.camera.setView({ | |
destination : new Cesium.Cartesian3.fromDegrees(4.7128563,53.051284, 500), | |
orientation: { | |
heading : Cesium.Math.toRadians(30), | |
pitch : Cesium.Math.toRadians(-20), | |
roll : 0.0 | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment