import{defineWebglEvent}from"../../webgl/event";import{ModelMouseEvent}from"../../common/constant";import{DTEvent}from"../../common/event-emitter";let prevModelId,prevTime=new Date().getTime();export default defineWebglEvent(ModelMouseEvent.Mousemove,(a,b)=>{a.emit(new DTEvent(ModelMouseEvent.Mousemove,b.params));let c=b.params.component;if(!(c&&c.modelId===prevModelId)){if(prevModelId){let c=a.get(prevModelId);if(c){let d=new DTEvent(ModelMouseEvent.Blur,{...b.params,component:c,object:c.model});c.emit(d),a.emit(d)}}b.type=ModelMouseEvent.Hover,c&&(c.emit(b),a.emit(b)),prevModelId=c?c.modelId:void 0}});