diff --git a/src/components/engine/index.ts b/src/components/engine/index.ts index ec7dda7..3bb186a 100644 --- a/src/components/engine/index.ts +++ b/src/components/engine/index.ts @@ -141,6 +141,13 @@ export class Engine implements IBimComponent { registry.emit('component:deselected', {}); } }); + + // 监听剖切值变化事件 + this.engine.events.on('section-move', (data: any) => { + console.log('[Engine] 剖切值变化:', data); + const registry = ManagerRegistry.getInstance(); + registry.emit('section:move', data); + }); } catch (error) { console.error('[Engine] Failed to initialize engine:', error); this._isInitialized = false; diff --git a/src/types/events.ts b/src/types/events.ts index 32f11db..457262a 100644 --- a/src/types/events.ts +++ b/src/types/events.ts @@ -35,6 +35,9 @@ export interface EngineEvents { 'component:selected': { url: string; id: string }; 'component:deselected': {}; + // 剖切事件 + 'section:move': { x?: { min: number; max: number }; y?: { min: number; max: number }; z?: { min: number; max: number } }; + // AI 聊天事件 'aiChat:opened': {}; 'aiChat:closed': {};