Closed minecrawler closed 1 year ago
I guess I should change the scope to add/remove, because that's the only thing we can detect on an entity.
Now tracked on Kanban:
So I tested field-based changes, and while JS is a wonderful unicorn chewing gum and I can easily implement it, the performance is actually very bad (using Object.defineProperty.set) - especially for continually changing fields. Even if I create a wrapper which can be applied only to interesting components, it's bad. Iteration is faster if you just copy values over in a system, so that's what I recommend to do. Don't wait for mutation, just copy it.
With that, change events are handled. That's one of my oldest tickets, so cheers to closing it!
Fire events when components are created, components are added/removed and deleted.