How to cancel file loading async request

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.

Aborting file loading requests is currently not possible. More information in the following issue and the related PR:

2 Likes