Yeah, I’ve been using console.log to log everything. It only runs the fetch once. It fails when it tries to load the texture, or rather when it tried to get the file.
I believe it is using the imageLoader and trying to put “chrome-extension://jdgkbifmkkkcgglljmlojibojoafmlhi/texture_0.png” in the image.src:
class ImageLoader extends Loader {
constructor( manager ) {
super( manager );
}
load( url, onLoad, onProgress, onError ) {
if ( this.path !== undefined ) url = this.path + url;
url = this.manager.resolveURL( url );
const scope = this;
const cached = Cache.get( url );
if ( cached !== undefined ) {
scope.manager.itemStart( url );
setTimeout( function () {
if ( onLoad ) onLoad( cached );
scope.manager.itemEnd( url );
}, 0 );
return cached;
}
const image = createElementNS( 'img' );
function onImageLoad() {
removeEventListeners();
Cache.add( url, this );
if ( onLoad ) onLoad( this );
scope.manager.itemEnd( url );
}
function onImageError( event ) {
removeEventListeners();
if ( onError ) onError( event );
scope.manager.itemError( url );
scope.manager.itemEnd( url );
}
function removeEventListeners() {
image.removeEventListener( 'load', onImageLoad, false );
image.removeEventListener( 'error', onImageError, false );
}
image.addEventListener( 'load', onImageLoad, false );
image.addEventListener( 'error', onImageError, false );
if ( url.substr( 0, 5 ) !== 'data:' ) {
if ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin;
}
scope.manager.itemStart( url );
image.src = url;
return image;
}
}
So I end up with the error
GET chrome-extension://jdgkbifmkkkcgglljmlojibojoafmlhi/texture_0.png net::ERR_FILE_NOT_FOUND
Is there a way to overwrite how urls get assigned to image.src? Similar to how you rewrite the fetch?
But even if there is a way, I wouldn’t be able to parse that url, because it has some weird random letters “chrome-extension://jdgkbifmkkkcgglljmlojibojoafmlhi/” , the locality of the file has been lost.