初始化

This commit is contained in:
yuding
2025-12-24 19:02:34 +08:00
parent 4b5eb78bbb
commit 04a5e74284
51 changed files with 8576 additions and 5334 deletions

View File

@@ -13,32 +13,42 @@ export class Toolbar extends BimButtonGroup {
// 动态加载默认按钮配置
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');
const { walkBirdButton } = await import('./buttons/walk/walk-bird');
const { settingButton } = await import('./buttons/setting');
const { infoButton } = await import('./buttons/info');
const { createZoomBoxButton } = await import('./buttons/zoom-box');
const { createLocationButton } = await import('./buttons/location');
const { createWalkMenuButton } = await import('./buttons/walk/walk-menu');
const { createWalkPersonButton } = await import('./buttons/walk/walk-person');
const { createWalkBirdButton } = await import('./buttons/walk/walk-bird');
const { createSettingButton } = await import('./buttons/setting');
const { createInfoButton } = await import('./buttons/info');
const { createMeasureButton } = await import('./buttons/measure');
const { createSectionMenuButton } = await import('./buttons/section/section-menu');
const { createSectionPlaneButton } = await import('./buttons/section/section-plane');
const { createSectionAxisButton } = await import('./buttons/section/section-axis');
const { createSectionBoxButton } = await import('./buttons/section/section-box');
this.addGroup('group-1');
// 使用工厂函数创建按钮,并注入 engine
if (this.engine) {
this.addButton(createHomeButton(this.engine));
// 你要求:在"首页"后面添加"选框放大"
this.addButton(createZoomBoxButton(this.engine));
this.addButton(createMeasureButton(this.engine));
this.addButton(createSectionMenuButton(this.engine));
this.addButton(createSectionPlaneButton(this.engine));
this.addButton(createSectionAxisButton(this.engine));
this.addButton(createSectionBoxButton(this.engine));
this.addButton(createWalkMenuButton(this.engine));
this.addButton(createWalkPersonButton(this.engine));
this.addButton(createWalkBirdButton(this.engine));
this.addButton(createLocationButton(this.engine));
this.addGroup('group-2');
this.addButton(createSettingButton(this.engine));
this.addButton(createInfoButton(this.engine));
} else {
console.warn('[Toolbar] Engine not available when creating buttons.');
}
this.addButton(walkMenuButton);
this.addButton(walkPersonButton);
this.addButton(walkBirdButton);
this.addButton(locationButton);
this.addGroup('group-2');
this.addButton(settingButton);
this.addButton(infoButton);
this.render();
}
}