observer computes AND operation on topics
- Fixed scope in pipeline
- array helpers for intersection and similarity
- improved invoker function
- spread and parallel functional helpers
observer with support to multiple topics
- refactored entity class to take advantage of add and remove component events
- listeners are currently saved as singletons
- removed unnecessary utility functions
- component collection mixin isolated from entity
- improved observer class
- fully working entity class
unsubscribe function deletes all subscriber when there are no arguments
fixed bug when component is removed but listeners are not fired properly
`add` and `remove` method in component collection return the component added or
removed.
empty entities can be idenfitified with `isEmpty` method
Entity collection is used to store all the entities with and without components
in families of components. An entity with two components `velocity` and
`position` is stored twice: in `velocity` and `position` set. These is
convenient when we need to retrieve entities by components (O(1) operation).
The collection react to dynamic addition and deletion: if a new component is
added, the entity is automagically added to the appropriate set. The same
applies on components deletion.
The world class is responsabile for managing entities (among other things). One
can use the `addEntity` and `removeEntity` to achieve such result. Events on
entity added/removed and component added/removed are available for consumption.
updated doc with new method names
System collection is used to keep track of all the systems.
When a system is added/removed to/from the world the relevant hook is fired.
`update` method is used to update all the systems in the world.