Jecs v0.2.8
[email protected]
Added
- Added explicit
query:iter()
- This is meant to be used as a stop-gap for proper of types until luau fixes inference of
__iter
.
- This is meant to be used as a stop-gap for proper of types until luau fixes inference of
- Added component hooks by @DunnoConz in #98
- Component hooks are traits that can be added to a component.
world:set(Position, jecs.OnAdd, function(entity)
print(`entity ${entity}` has added $Position`)
end)
world:set(Position, jecs.OnSet, function(entity, data)
print(`entity ${entity}` has changed $Position to {data}`)
end)
world:set(Position, jecs.OnRemove, function(entity)
print(`entity ${entity}` has removed $Position`)
end)
Changed
- Changed names of the pair functions from
ecs_pair_relation
andecs_pair_target
topair_first
andpair_second
respectively.
Fixed
- Added
world:archetypes()
toEmptyQuery
thread: https://discord.com/channels/385151591524597761/1248734074940559511
Check out the demo that is in WIP
Full Changelog: v0.2.6...v0.2.8