Hi I use three.TextureLoader().loadAsync() and I would like to ask, how to cancel asynch texture loading (I have virtual tour with combination of sliced panorama photos, meshes, 3dscans and so on… which are loaded on demand) and when user switch between places not actual loading requests are still arriving.
For now I solve this like:
ew three.TextureLoader().loadAsync(pathToLoad).then((texture: three.Texture) => {
if (panorama.is_previewed) {
}
But I would like to know if there is some more cultivated solution for this. Because in clear fetch() I know how to cancel it but I’m not sure if texture loaded interface has something like this.
Does anyone have a sample of overriding textureloader functions to deal with an abort controller?
The circumstance is: You have a heavy application (say a world map) and you start loading an area (which might take 5 seconds to completely fill in) but the user teleports to a different area and expects loading to be 5 seconds, not 10. The previous loading areas for the old area have not yet finished.