Releases: recatek/gecs
Releases · recatek/gecs
v0.3.0
- Entity types and component storage are no longer unintentionally
!Send
and!Sync
. - Changing vocabulary of "push"/"remove" for entities to "create"/"destroy" to be more explicit.
- Adding a function to get the number of archetypes a world has.
- Small optimizations for hashing Entity types.
- Adding the
wrapping_entity_version
andwrapping_entity_raw_version
features to have version overflows for these types wrap instead of panic. This could theoretically cause invalid entity access, but the likelihood is extremely small, and still won't allow unsafe memory access. - The
ecs_find!
query and its borrow variant now return anOption<T>
of the query closure's return type, which may beOption<()>
. This will beSome
if the entity is found, andNone
otherwise. - Adding the
EntityRaw
andEntityRawAny
types, which accelerate lookup by skipping the slot lookup step. These are version-invalidated if the archetype's ordering changes (namely, when an entity is removed). These can be used interchangeably withEntity
andEntityAny
in most situations (the main exception being the destroy functions on worlds and archetypes). - Adding the
View
andViewHas
types, and theview(entity)
function. These allow access, including generic access, to a single entity's multiple components from a single lookup, without requiring a find query.
v0.2.1
v0.2.0
- Adds support for archetypes with
Vec
-like dynamic storage capacity. This can be used by setting the keyworddyn
as the capacity value in theecs_archetype!
declaration. Worlds generated byecs_world!
now have awith_capacity
function with arguments for each dynamic archetype to pre-allocate storage.- Fixed-capacity archetypes won't have arguments in
with_capacity
-- they are always allocated to their full fixed capacity on world creation.
- Fixed-capacity archetypes won't have arguments in
- Adds an
Entity<_>
pseudo-parameter to queries. This will match any archetype likeEntityAny
, but will yield a typedEntity<A>
for the currently-matched archetype in the query body. - Adds a new
32_components
crate feature to go up to 32 maximum components in a single archetype. Enabling this feature may impact compile times.