添加测试信息

This commit is contained in:
yuding
2025-12-08 10:02:24 +08:00
parent 244891ceec
commit c112c87dad
21 changed files with 3355 additions and 2192 deletions

View File

@@ -12,7 +12,7 @@ export class Toolbar extends BimButtonGroup {
await super.init();
// 动态加载默认按钮配置
const { homeButton } = await import('./buttons/home');
const { createHomeButton } = await import('./buttons/home');
const { locationButton } = await import('./buttons/location');
const { walkMenuButton } = await import('./buttons/walk/walk-menu');
const { walkPersonButton } = await import('./buttons/walk/walk-person');
@@ -21,7 +21,14 @@ export class Toolbar extends BimButtonGroup {
const { infoButton } = await import('./buttons/info');
this.addGroup('group-1');
this.addButton(homeButton);
// 使用工厂函数创建按钮,并注入 engine
if (this.engine) {
this.addButton(createHomeButton(this.engine));
} else {
console.warn('[Toolbar] Engine not available when creating buttons.');
}
this.addButton(walkMenuButton);
this.addButton(walkPersonButton);
this.addButton(walkBirdButton);