Hello, I am using React native WebView and I am facing this error “Expected width to be greater than 0, actual value was 0” or “drawingBufferWidth must be greater than zero” on mobile devices with lower RAM, now I am testing on Xiaomi Redmi 9A (2GB RAM) and this error always shows when I am trying to show the 3D tiles or sometimes when I want to camera fly to my current location.
My Cesium3DTileset options are:
maximumScreenSpaceError: 64,
maximumMemoryUsage: 128,
dynamicScreenSpaceError: true,
skipLevelOfDetail: true,
immediatelyLoadDesiredLevelOfDetail: true,
This error also shows when I am trying to open (in Chrome) 3D Tileset Photogrammetry sandcastle on this device.
Just to cross-link, I added some suggestions in Error on mobile devices with lower RAM · Issue #10888 · CesiumGS/cesium · GitHub. Please let me know if any of those are relevant to your case.
Unfortunately this does not helped, still same crash, even with this:
viewer.scene.requestRenderMode = true;
viewer.scene.rethrowRenderErrors = true;
viewer.scene.postProcessStages.fxaa.enabled = false;
viewer.scene.fxaa = false;
viewer.scene.fxaaOrderIndependentTranslucency = false;
viewer.scene.globe.maximumScreenSpaceError = 1.5;
viewer.useBrowserRecommendedResolution = false;
viewer.resolutionScale = 0.45;
viewer.scene.skyBox.show = false;
viewer.scene.sun.show = false;
viewer.scene.sunBloom = false;
viewer.scene.skyAtmosphere.show = false;
viewer.scene.terrainShadows = false;
viewer.scene.shadows = false;
viewer.scene.shadowMap.enabled = false;
viewer.scene.moon.show = false;
viewer.scene.globe.enableLighting = false;
viewer.scene.globe.showNight = false;
viewer.scene.globe.showDay = false;
viewer.scene.globe.affectedByLighting = false;
new Cesium.Cesium3DTileset({
url: '${tileUrl}',
maximumScreenSpaceError: 64,
maximumMemoryUsage: 128,
dynamicScreenSpaceError : true,
skipLevelOfDetail: true,
immediatelyLoadDesiredLevelOfDetail: true,
}
Hi there,
I do see that scene.globe.maximumScreenSpaceError
is set lower than the default, which will increase visual fidelity at the expense of performance. Can you set that to a higher value instead? Try 4
, 8
, etc…
Would you mind posted the results of visiting https://webglreport.com on the device?