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:
@@ -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;
|
||||
|
||||
@@ -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': {};
|
||||
|
||||
Reference in New Issue
Block a user