Merge branch '4.0' into 4.1-beta

# Conflicts:
#	spine-ts/package-lock.json
This commit is contained in:
Mario Zechner 2022-01-19 15:33:05 +01:00
commit 9ee399bd1c

View File

@ -138,7 +138,8 @@ export class AssetManagerBase implements Disposable {
loadTextureAtlas (path: string,
success: (path: string, atlas: TextureAtlas) => void = null,
error: (path: string, message: string) => void = null
error: (path: string, message: string) => void = null,
fileAlias: {[keyword:string] : string} = null
) {
let index = path.lastIndexOf("/");
let parent = index >= 0 ? path.substring(0, index + 1) : "";
@ -149,7 +150,7 @@ export class AssetManagerBase implements Disposable {
let atlas = new TextureAtlas(atlasText);
let toLoad = atlas.pages.length, abort = false;
for (let page of atlas.pages) {
this.loadTexture(parent + page.name,
this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name],
(imagePath: string, texture: Texture) => {
if (!abort) {
page.setTexture(texture);