Use loader signals for progress and fix error handler arguments.
PIXI.Loader#on is a no-op since pixi.js 5.3, so the progress callback in PIXIApp.loadTextures was never called. Also PIXI.Loader#onError passes (error, loader, resource), so log the failed url and error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -528,7 +528,7 @@ export default class PIXIApp extends PIXI.Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (progress) {
|
if (progress) {
|
||||||
loader.on('progress', e => {
|
loader.onProgress.add(e => {
|
||||||
this.progress(e.progress)
|
this.progress(e.progress)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ export class PIXITileLoader extends TileLoader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onError(loader, error) {
|
_onError(error, loader, resource) {
|
||||||
console.warn('Cannot load', error)
|
console.warn('Cannot load', resource ? resource.url : '', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Private method. Called by the PIXI loader after each successfull
|
/** Private method. Called by the PIXI loader after each successfull
|
||||||
|
|||||||
Reference in New Issue
Block a user