现版本

This commit is contained in:
yuding
2026-04-14 10:16:37 +08:00
parent 819992f331
commit 0b730da6f4
17 changed files with 20376 additions and 21126 deletions

View File

@@ -302,6 +302,66 @@ export class EngineManager extends BaseManager {
return this.engineInstance.jumpToCamera(cameraData);
}
public getConstructTreeData(): { level: any[]; type: any[]; major: any[] } {
if (!this.engineInstance) {
console.warn('[EngineManager] 3D Engine not initialized.');
return { level: [], type: [], major: [] };
}
return {
level: this.engineInstance.getLevelTreeData(),
type: this.engineInstance.getTypeTreeData(),
major: this.engineInstance.getMajorTreeData(),
};
}
public getComponentProperties(url: string, id: string, callback: (data: any) => void): void {
if (!this.engineInstance) {
console.warn('[EngineManager] 3D Engine not initialized.');
return;
}
this.engineInstance.getComponentProperties(url, id, callback);
}
public registerRightKeyHandler(handler: (e: MouseEvent) => MenuItemConfig[] | null): void {
if (!this.rightKey) {
console.warn('[EngineManager] RightKey manager not initialized.');
return;
}
this.rightKey.registerHandler(handler);
}
public unregisterRightKeyHandler(handler: (e: MouseEvent) => MenuItemConfig[] | null): void {
if (!this.rightKey) {
console.warn('[EngineManager] RightKey manager not initialized.');
return;
}
this.rightKey.unregisterHandler(handler);
}
public clearRightKeyHandlers(keepDefault: boolean = true): void {
if (!this.rightKey) {
console.warn('[EngineManager] RightKey manager not initialized.');
return;
}
this.rightKey.clearHandlers(keepDefault);
}
public showRightKeyMenu(x: number, y: number, items: MenuItemConfig[], groupOrder?: string[]): void {
if (!this.rightKey) {
console.warn('[EngineManager] RightKey manager not initialized.');
return;
}
this.rightKey.showMenu(x, y, items, groupOrder);
}
public hideRightKeyMenu(): void {
if (!this.rightKey) {
console.warn('[EngineManager] RightKey manager not initialized.');
return;
}
this.rightKey.hide();
}
/** 销毁引擎管理器 */
public destroy(): void {
if (this.engineInstance) {