Working with code below, when by rotating a view camera.pitch becomes positive- rendering stops.
@import url("../api/Build/Cesium/Widgets/widgets.css");
html,
body,
#cesiumContainer {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background-color: white
}
``
It has nothing to do with skyBox: false and globe: false.
In my case, it will be enough to prevent user to rotate view under terrain, so please advice me how to do it.
I tried with:
viewer.camera.changed.addEventListener(function () {
if (viewer.camera.pitch >= 0) {
viewer.camera.setView({ orientation: { pitch: Cesium.Math.toRadians(-10.0) } })
}
});
``
But rendering also stops, so it may not be linked to camera.pitch only…
Cesium 1.44 - 2018-04-02
Google Chrome
Version 67.0.3396.99 (Official Build) (64-bit)
Windows 10 Pro 1709
Even more info
I reproduce the same error in sandbox : https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=CZML%20Box.html&label=CZML
Just move camera direction near box, under and rotate up…
Dana petak, 6. srpnja 2018. u 15:52:24 UTC+2, korisnik Alen Kelemen napisao je:
omar
July 6, 2018, 6:23pm
4
Hey Alen,
I’m having a hard time reproducing the exact error. I think I was able to reproduce a related but different error. I got this by starting on the cube in the example you provide, picking a point on it, holding the middle mouse button, and moving my mouse in clockwise circles on the view for a few seconds:
An error occurred while rendering. Rendering has stopped.
undefined
DeveloperError: normalized result is not a number
Error
at new DeveloperError (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:540:19 )
at Function.Cartesian3.normalize (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:8132:19 )
at rotateVertical (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:186217:28 )
at Camera.rotateUp (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:186208:9 )
at rotate3D (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:231295:20 )
at tilt3DOnEllipsoid (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:231534:9 )
at tilt3D (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:231476:13 )
at reactToInput (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:230287:21 )
at update3D (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:231807:9 )
at ScreenSpaceCameraController.update (https://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:231840:13 )
Notice how mine is an error in rotateVertical , whereas yours is in pan3D . Can you describe a bit more how exactly you’re triggering this?
Just copy js part of my code in sandbox:
var czml = [{
“id”: “document”,
“version”: “1.0”
},
{
“id”: “1”,
“polygon”: {
“positions”: {
“cartographicDegrees”: [29.059, 44.3189, 15, 29.059, 44.3192, 15, 29.05995, 44.3193, 15, 29.0599, 44.3190, 15]
},
extrudedHeight: 50
}
}];
var viewer = new Cesium.Viewer(‘cesiumContainer’,
{
skyBox: false,
globe: false,
});
var p = Cesium.CzmlDataSource.load(czml);
p.then(function ® { console.log® })
viewer.dataSources.add§;
viewer.zoomTo§;
``
and then rotate the cube using ctrl & left mouse button and move cursor up , so cube will rotate… and rendering stops when bottom plane of the cube become visible
Dana petak, 6. srpnja 2018. u 20:23:10 UTC+2, korisnik Omar Shehata napisao je:
omar
July 7, 2018, 5:23pm
6
Thanks for following up Alen. I think it’s a bug with Cesium’s camera not handling the case when the camera is at the origin. I’ve opened up an issue so that the Cesium maintainers can look at it here:
Feel free to add any more detail/comments there, or follow the issue to see how it progresses.