feat(registry): 注册 ComponentDetailManager 到全局 Registry 和 BimEngine
This commit is contained in:
@@ -35,6 +35,10 @@ export class WalkControlManager extends BaseManager {
|
||||
|
||||
this.registry.toolbar.hide();
|
||||
|
||||
// 打开漫游面板时,默认激活第一人称模式
|
||||
console.log('[WalkControl] 打开漫游面板,激活第一人称模式');
|
||||
this.registry.engine3d?.activateFirstPersonMode();
|
||||
|
||||
this.panel = new WalkControlPanel({
|
||||
onPlanViewToggle: (isActive) => {
|
||||
console.log('[WalkControl] 地图:', isActive);
|
||||
@@ -55,19 +59,16 @@ export class WalkControlManager extends BaseManager {
|
||||
this.emit('walk:path-mode-toggle', { isActive });
|
||||
},
|
||||
onWalkModeToggle: (isActive) => {
|
||||
console.log('[WalkControl] 第一人称漫游:', isActive);
|
||||
console.log('[WalkControl] 第三人称漫游按钮点击:', isActive);
|
||||
if (isActive) {
|
||||
this.pathManager?.hide();
|
||||
this.registry.engine3d?.activateFirstPersonMode();
|
||||
} else {
|
||||
this.registry.engine3d?.deactivateFirstPersonMode();
|
||||
alert('第三人称功能开发中');
|
||||
}
|
||||
this.emit('walk:walk-mode-toggle', { isActive });
|
||||
},
|
||||
onSpeedChange: (speed) => {
|
||||
console.log('[WalkControl] 速度变化:', speed);
|
||||
// 将 UI 速度值转换为引擎速度值(UI: 1-10, 引擎: 0.01-0.1)
|
||||
const engineSpeed = speed * 0.01;
|
||||
const engineSpeed = speed * 0.1;
|
||||
this.registry.engine3d?.setWalkSpeed(engineSpeed);
|
||||
this.emit('walk:speed-change', { speed });
|
||||
},
|
||||
@@ -122,6 +123,9 @@ export class WalkControlManager extends BaseManager {
|
||||
public hide(): void {
|
||||
this.pathManager?.hide();
|
||||
|
||||
console.log('[WalkControl] 关闭漫游面板,退出第一人称模式');
|
||||
this.registry.engine3d?.deactivateFirstPersonMode();
|
||||
|
||||
if (this.panel) {
|
||||
this.panel.destroy();
|
||||
this.panel = null;
|
||||
|
||||
Reference in New Issue
Block a user