Cesium Inspector doesn't work without globe
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
This may be expected behavior, and if so feel free to close. I just encountered it while testing for release and wanted to document it.
If you load this Sandcastle and quickly hit "show frustum planes" you'll get the following error:
https://sandcastle.cesium.com/index.html?src=Cesium%20Inspector.html&label=All
```
DeveloperError: normalized result is not a number
Error
at new DeveloperError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:82:23)
at Function.Cartesian3.normalize (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:1954:23)
at https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:41888:35
at computeTriangleAttributes (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:41921:17)
at splitLongitudeTriangles (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:42093:25)
at Object.GeometryPipeline.splitLongitude (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:42563:21)
at geometryPipeline (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:97951:42)
at Object.PrimitivePipeline.combineGeometry (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:98097:30)
at loadSynchronous (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:99887:44)
at Primitive.update (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:100514:21)
```
It looks as though this error is only thrown if this option is turned on before the globe loads.
It looks like you can't turn on the Cesium Inspector if you disable the globe in the Viewer constructor. It will throw the following error if you try to do this:
```
Uncaught TypeError: Cannot set property 'depthTestAgainstTerrain' of undefined (on line 252774 of https://sandcastle.cesium.com/CesiumUnminified/Cesium.js)
```
Contributor guide
Research direction
Reproduce the failure from the Cesium Inspector Sandcastle link by enabling “show frustum planes” before the globe loads and by disabling the globe in the Viewer constructor. Start with the reported Cartesian3.normalize, GeometryPipeline.splitLongitude, and Cesium Inspector stack entries. Done means the Inspector can be enabled in both cases without either reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100