Frustrum is NaN

Hi

(Cesium 1.3)

sometimes , I’ve got a Nan value for “far”. And thenthe folloxing function return a numFrustums as NaN.

and updateFrustums failed due to the line frustumCommandsList.length.

var numFrustums = Math.ceil(Math.log(far / near) / Math.log(farToNearRatio));

if (near !== Number.MAX_VALUE && (numFrustums !== numberOfFrustums || (frustumCommandsList.length !== 0 &&

(near < frustumCommandsList[0].near || far > frustumCommandsList[numberOfFrustums - 1].far)))) {

updateFrustums(near, far, farToNearRatio, numFrustums, frustumCommandsList);

createPotentiallyVisibleSet(scene);

Best Regards

Can you consistently reproduce it like https://github.com/AnalyticalGraphicsInc/cesium/issues/2317

Patrick

No, I had this issue with my terrain provider , when I forget todefine the levelZeroMaximumGeometricError.
Once I added the Cesium.TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap in order to define my variable.I don’t have this problem anymore.

But perhaps you should detect such issue in the code (NaN .) and reset properly the camera…