Jecs v0.2.10-rc.3
Pre-release
Pre-release
Changelog
[traits]
:- Added cleanup condition
jecs.OnDelete
for when the entity or component is deleted - Added cleanup action
jecs.Remove
which removes instances of the specified (component) id from all entities- This is the default cleanup action
- Added component trait
jecs.Tag
which allows for zero-cost components used as tags- Setting data to a component with this trait will do nothing
- Added cleanup condition
[luau]
:- Exported
world:contains()
- Exported
query:drain()
- Exported
Query
- Improved types for the hook
OnAdd
,OnSet
,OnRemove
- Changed functions to accept any ID including pairs in type parameters
- Applies to
world:add()
,world:set()
,world:remove()
,world:get()
,world:has()
andworld:query()
- New exported type
Id<T = nil> = Entity<T> | Pair
- Applies to
- Changed
world:contains()
to return aboolean
instead of an entity which may or may not exist - Fixed
world:has()
to take the correct parameters
- Exported
thread: https://discord.com/channels/385151591524597761/1248734074940559511
Check out the demo that is in WIP
Full Changelog: v0.2.10-rc.1...v0.2.10-rc.3