leoweyr
leoweyr
### Is your feature request related to a problem? Please describe. 在现有的机制上,只允许添加事件监听器,而不能移除事件监听器(除非重启服务端)。如果一个事件监听器的设计是有生命寿命的,在超出生命寿命后它仍然继续执行虽然可以加层判断阻拦但是在 Ticks 中还是会有执行帧,多多少少会有性能上的消耗(特别是量大的情况下)。 ### Describe the solution you'd like 在底层上对 Levilamina 事件监听器进一步封装,在 LegacyScriptEngine 使用上,每次添加一个事件监听器返回一个事件监听器的对象,该事件监听器存在一个方法可以对内存中的事件监听器(自身)进行销毁移除,来实现对事件监听器的精细控制。 ### Describe alternatives you've considered...
* build: configure rollup to compile from typescript source files([6717d07](https://github.com/leoweyr/react-layers-manager/commit/6717d079c7c9dfd0e5cf2738df4d5405ac7965ec)) * refactor: migrate project to typescript([669043e](https://github.com/leoweyr/react-layers-manager/commit/669043e3395173e51f90bc67b45b925dff1f370f)) * build: replace rm -rf with rimraf for cross-platform compatibility([40af11e](https://github.com/leoweyr/react-layers-manager/commit/40af11e58d3907f343c6e0772954e6c5b460cefd))