mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-31 03:12:35 +01:00
Update figuredata checker
This commit is contained in:
parent
402eedf738
commit
8c431ab337
@ -1,3 +1,4 @@
|
||||
import { NitroLogger } from '../../core';
|
||||
import { IAssetManager } from '../../core/asset/IAssetManager';
|
||||
import { NitroManager } from '../../core/common/NitroManager';
|
||||
import { NitroEvent } from '../../core/events/NitroEvent';
|
||||
@ -194,15 +195,17 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
|
||||
private loadFigureData(): void
|
||||
{
|
||||
const defaultFigureData = (Nitro.instance.getConfiguration<string>('avatar.default.figuredata') as IFigureData);
|
||||
const defaultFigureData = Nitro.instance.getConfiguration<IFigureData>('avatar.default.figuredata');
|
||||
|
||||
if(defaultFigureData)
|
||||
if(!defaultFigureData || (typeof defaultFigureData === 'string'))
|
||||
{
|
||||
if(!defaultFigureData) throw new Error('invalid_default_figure_data');
|
||||
NitroLogger.log('XML figuredata is no longer supported.');
|
||||
|
||||
if(this._structure) this._structure.initFigureData(defaultFigureData);
|
||||
return;
|
||||
}
|
||||
|
||||
if(this._structure) this._structure.initFigureData(defaultFigureData);
|
||||
|
||||
const structureDownloader = new AvatarStructureDownload(Nitro.instance.getConfiguration<string>('avatar.figuredata.url'), (this._structure.figureData as IFigureSetData));
|
||||
|
||||
structureDownloader.addEventListener(AvatarStructureDownload.AVATAR_STRUCTURE_DONE, this.onAvatarStructureDownloadDone);
|
||||
|
Loading…
x
Reference in New Issue
Block a user