Releases: ayebear/picoes
PicoES v1.1.1
Added entity
key to entity data object, to allow a more consistent each()
syntax:
world.each('comp', ({ comp }, entity) => { entity.remove(comp) })
now becomes:
world.each('comp', ({ entity, comp }) => { entity.remove(comp) })
Internally, a reference to the parent entity is inside entity.data, so you cannot have components named 'entity'
anymore.
PicoES v1.1.0
- Improved
world.each()
performance by skipping first entity in componenthas()
checks. - Updated package versions
- Migrated travis CI to github actions
- Updated internal documentation to reach 100% documentation coverage
PicoES v1.1.0-rc0
Updated World
interface
- Removed
context()
method, replaced withcontext
getter/setter (replaces) - Added
systems
getter/setter (merges) - Added
components
getter/setter (merges)
PicoES v1.0.0
After many design iterations, PicoES 1.0.0 is finally here!
- Further performance optimizations
- Improved performance of Entity methods
remove
anddestroy
- Improved performance of internal index management, which affects many operations
- Improved performance of
each
query performance by sorting component names based on index size, to help reduce the average time of short-circuiting if an entity has all the components in the query.
- Improved performance of Entity methods
- Removed
components
getter from Entity (for getting list of current component keys) - Updated documentation and README
- Continued 100% test code coverage
PicoES v1.0.0-alpha8
- An additional 1-3x performance boost all around
- This is mostly from the
has()
changes affecting query performance - Also from simpler
set()
logic
- This is mostly from the
- Cleaned up
Entity
interface- New
has()
with single-key check. This is a breaking change.- This decision was made based on performance, as well as very low usage of
has[Any/All]
in production. - It is more typical to combine
.has()
checks with&&
,||
, and!
operators - In the few cases of libraries - like PicoES itself, or something like an
EntitySet
in a real project - a simple.some()
or.every()
call will still work great for whichever custom case you need.
- This decision was made based on performance, as well as very low usage of
- Removed methods (
setRaw
,setWithFallback
,hasAny
,has[All]
, andremoveAll
) - Made some methods private (
cloneComponentTo
,removeAll
- moved todestroy
) - Added new
replace
based on oldsetRaw
- New
- Cleaned up tests (removed
assert
) - Updated documentation, fixed args, and updated examples
PicoES v1.0.0-alpha7
- ~3x query performance boost
- This was achieved by using callbacks instead of
yield
which seems to be very slow
- This was achieved by using callbacks instead of
- World initialization
- Added new options object to
World
constructor, to register systems, components, and context all at once
- Added new options object to
- Simplified system context
- Now just one object
- Can simulate old keyed context by passing an object with one key
- Big code refactor
- Removed indexers, but preserved concept of
SimpleIndex
. The memoized one was very slow in real world cases, and the interface was limiting for other types of performance improvements, while adding unnecessary complexity. - Split
World
code intoSystemStorage
andEntityStorage
- More standard test code with regular jest callbacks, some more uses of
expect
instead ofassert
. - Deleted lots of old, unused methods throughout the code, such as prototypes, and redundant entity methods
- Updated to use new import/export module syntax
- Moved tests into separate directory, and made use of "files" array in package.json to shrink installed bundle size significantly.
- Setup prettier for automated formatting
- Removed indexers, but preserved concept of
This covers fixing part of #43 , but there are still many potential improvements to make.
PicoES v1.0.0-alpha4
- Added
hasAny()
to Entity
PicoES v1.0.0-alpha3
- Added entity and component cloning support
- Custom implementations of
cloneArgs()
and/orclone()
can be provided for each registered component. - Fallback implementation of a simple shallow clone will be used in other cases
- Custom implementations of
- Default component values now get set to first argument, or undefined
- Added a
setWithFallback()
to have some more control over how unregistered components get set - Additional tests and code cleanup
PicoES v1.0.0-alpha2
Fixed issue where context was unavailable in system constructors, by adding an init()
method to systems. This gets called automatically when registering systems, which works differently than initialize()
did in the past.
PicoES v1.0.0-alpha1
This is the first alpha release of PicoES v1.0.0. While it has 100% test coverage, it has not been thoroughly tested or integrated into a large project yet.
- Major system interface cleanup
- Removed
initialize()
,pre()
,every()
,post()
from systems - Added
run()
to systems - System creation is now much simpler without components
- Removed
- Added new
world.each()
with simpler and more powerful query syntax- Queries can be mixed with arrays/strings for some backwards compatibility, and to support more developer preferences
- Callback uses destructuring syntax from raw entity data
- This has improved performance, over the previous version with a bunch of internal
map()
andget()
calls - This helps prevent passing the wrong components to the wrong parameters. It doesn't require specifying unused components, and it allows getting optional components that weren't part of the query.
- This has improved performance, over the previous version with a bunch of internal
- Added automatic dependency injection
- Systems can use
world.context()
with keys or keyless - Registered components now get their parent
entity
injected
- Systems can use