3DStreet / 3dstreet

🚲🚢🚌 Web-based 3D visualization of streets using A-Frame
https://3dstreet.app
Other
254 stars 33 forks source link

sometimes 3dtiles do not load #703

Closed kfarr closed 4 weeks ago

kfarr commented 1 month ago

One option is to use LoadingManager from three.js: https://threejs.org/docs/#api/en/loaders/managers/LoadingManager

In our local _initTileset create a new loading manager, attach to this, and send as a property to 3dtiles runtime: https://github.com/nytimes/three-loader-3dtiles/blob/dev/docs/three-loader-3dtiles.loaderprops.md#properties

It looks like this value defines how many tiles are loaded before firing onload https://github.com/nytimes/three-loader-3dtiles/blob/dev/docs/three-loader-3dtiles.loaderoptions.preloadtilescount.md

We can use this to monitor loading and if not working then to manually reset

kfarr commented 1 month ago

this might work

separately, the onProgress callback logs the number of tiles + number loading to console

when 3dtiles "stalls" (doesn't load) it stops at 65 tiles when it logs as loading complete. I captured a 2 screenshots of these stalls events below.

Perhaps we create logic such that if the loader says tiles complete but number of tiles <100, then reload the 3dtiles component?

Image

Image