I use AbortController to abort the model load, then refresh the controller, and the model fails to load again. Can you help me?
!!!source code path: three.js-r154\src\loaders\FileLoader.js
let controller = null;
class FileLoader extends Loader {
constructor( manager ) {
super( manager );
}
.........
load( url, onLoad, onProgress, onError ) {
.....
if ( controller ) {
controller = null;
}
controller = new AbortController();
const signal = controller.signal;
// start the fetch
fetch( req, { signal } ).then(.......)
}
cancelLoad() {
if ( controller ) {
try {
controller.abort();
controller = null; //Successfully set to null
} catch ( error ) {
console.log( error );
}
}
}
}