Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:45:01 +02:00
commit f4a01d6a69
11601 changed files with 4206660 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
namespace TSE {
export class ComponentManager {
private static _registeredBuilders: {[type: string]: IComponentBuilder} = {};
public static registerBuilder(builder: IComponentBuilder): void {
ComponentManager._registeredBuilders[builder.type] = builder;
}
public static extractComponent(json: any): BaseComponent {
if (ComponentManager._registeredBuilders[json?.type] === undefined) return undefined;
return ComponentManager._registeredBuilders[json.type].buildFromJson(json);
}
}
}