Skip to content

v0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@recatek recatek released this 22 Jul 03:15
· 55 commits to main since this release
  • 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 and wrapping_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 an Option<T> of the query closure's return type, which may be Option<()>. This will be Some if the entity is found, and None otherwise.
  • Adding the EntityRaw and EntityRawAny 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 with Entity and EntityAny in most situations (the main exception being the destroy functions on worlds and archetypes).
  • Adding the View and ViewHas types, and the view(entity) function. These allow access, including generic access, to a single entity's multiple components from a single lookup, without requiring a find query.