#0.23.0
- add
removeEntities
function (thank you @chriscoderdr !)
- Use
performance.now()
everywhere instead of falling back toDate.now()
- make API simpler and more consistent:
- alias addWorld -> createWorld
- alias addEntity -> createEntity
- alias addComponent -> addComponentToEntity
- alias removeComponent -> removeComponentFromEntity
- refactor
deferredRemovals
to not rely on entity indexes
- add
getEntityById(world, id)
andgetEntityId(world, entity)
functions
- add an
getEntity(world, components)
function for a bit of syntax sugar
- [
180ff077d7e
]](https://github.com/mreinstein/ecs/commit/180ff077d7e1c966ede47204ef69113c2102dbf3) fix some really terrible crashing bugs - add unit tests to cover all of those discovered cases
- oof, revert serious breakage from 0.18.2 :'(
- remove one function wrapper in the hot path
- fix bug where doing an immediate removal after a deferred removal breaks cleanup
- BREAKING:
added
andremoved
entities have a new API structure, where an additional argument is required - internally the
listeners
property uses Set instead of Object
- BREAKING:
added
andremoved
entities are now delayed until afterECS.cleanup()
runs to avoid missing entities based on system order. Fixes #35 - BREAKING: passing an invalid
listenerType
(e.g.,ECS.getEntities(w, [], 'blahblah')
) now throws an error - avoid
Array.splice()
because it generates memory garbage - replace rollup with esbuild in the chrome extension bundling step
- add Typescript types, jsdoc, and named exports
- add option to remove entity's immediately rather than being deferred to the next frame
- add preFixedUpdate
- add postFixedUpdate
- update deps
Thanks to @pavelvasev for both of these bug fixes!
- fix add component bug #22
- fix add component listener bug #19
- add option to remove entity's component immediately rather than being deferred to the next frame
- BREAKING: publish as a pure ES module
- add a chrome devtools extension to show realtime ECS stats
- use a more distinct separator string
- bugfix: handle duplicate entity removes
- bugfix: handle duplicate component adds and removes
- chore: update tap dep
- chore: include node 14 in travis ci builds
- fix not filter querying #12
- implement a not filter for components
- implement deferred removal of entities and components
- rename
emptyListeners
function tocleanup
- add a 3rd parameter to getEntities to enable querying for added and removed entities that match the filter
- improve readme
- add more tests
- added
onPreUpdate
andonPostUpdate
system lifecycle functions
- set default component data when none provided
- implement removeComponentFromEntity
- total API do-over
- initial unit tests