Constructors
constructor
- new FiveDomEvents(five, config?): FiveDomEvents
Methods
addAutoBindEventListener
- addAutoBindEventListener<T>(object, event, callback, config?): (() => void)
Returns (() => void)
addEventListener
- addEventListener<T>(object, event, callback, config?): void
Returns void
clear
- clear(): void
Returns void
dispose
- dispose(): void
Returns void
removeEventListener
- removeEventListener(object, event?, callback?, ...args): void
Returns void
toJSON
- toJSON(): {
boundObject: Partial<Record<keyof FiveDomEventMap, Object3DWithEvent[]>>;
} Returns {
boundObject: Partial<Record<keyof FiveDomEventMap, Object3DWithEvent[]>>;
}
@description: added 时自动绑定事件,removed时自动解绑事件,也就是说只有物体在场景中的时候才会触发事件 @note: 注意:目前需要触发物体的 added 事件和 removed 事件才会生效 @todo: added 和 removed 还是不太智能