feat(clipping): add section-move event listener

Listen for 'section-move' event from underlying engine and emit as 'section:move'.
Currently outputs to console for debugging.

Event type: { x?: {min, max}, y?: {min, max}, z?: {min, max} }
This commit is contained in:
yuding
2026-02-02 16:38:43 +08:00
parent 4a09d52283
commit 316f42ae6b
2 changed files with 10 additions and 0 deletions

View File

@@ -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;

View File

@@ -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': {};