Fix custom character lazy loading

This commit is contained in:
Gregoire Parant
2021-01-24 15:57:47 +01:00
parent 3d84a9c8cd
commit d93a8da828
4 changed files with 27 additions and 16 deletions
@@ -59,8 +59,9 @@ export class SelectCharacterScene extends ResizableScene {
if(texture.level !== -1){
continue;
}
const name = loadCustomTexture(this.load, texture);
this.playerModels.push({name: name, img: texture.url});
loadCustomTexture(this.load, texture).then((bodyResourceDescription: BodyResourceDescriptionInterface) => {
this.playerModels.push(bodyResourceDescription);
});
}
}
}