mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[ts][phaser] Fix texture fetching with loader path set. Closes #2845.
This commit is contained in:
parent
f256510248
commit
6e4162d093
@ -370,7 +370,10 @@ class SpineAtlasFile extends Phaser.Loader.MultiFile {
|
||||
}
|
||||
}
|
||||
|
||||
let basePath = file.src.match(/^.*\//) ?? "";
|
||||
let basePath = (file.src.match(/^.*\//) ?? "").toString();
|
||||
if(this.loader.path && this.loader.path.length > 0 && basePath.startsWith(this.loader.path))
|
||||
basePath = basePath.slice(this.loader.path.length);
|
||||
|
||||
for (var i = 0; i < textures.length; i++) {
|
||||
var url = basePath + textures[i];
|
||||
var key = file.key + "!" + textures[i];
|
||||
|
||||
@ -362,7 +362,10 @@ class SpineAtlasFile extends Phaser.Loader.MultiFile {
|
||||
}
|
||||
}
|
||||
|
||||
let basePath = file.src.match(/^.*\//) ?? "";
|
||||
let basePath = (file.src.match(/^.*\//) ?? "").toString();
|
||||
if(this.loader.path && this.loader.path.length > 0 && basePath.startsWith(this.loader.path))
|
||||
basePath = basePath.slice(this.loader.path.length);
|
||||
|
||||
for (var i = 0; i < textures.length; i++) {
|
||||
var url = basePath + textures[i];
|
||||
var key = file.key + "!" + textures[i];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user