Skip to content

Jecs v0.2.8

Compare
Choose a tag to compare
@Ukendio Ukendio released this 11 Aug 13:36
· 143 commits to main since this release

[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.
  • 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 and ecs_pair_target to pair_first and pair_second respectively.

Fixed

  • Added world:archetypes() to EmptyQuery

thread: https://discord.com/channels/385151591524597761/1248734074940559511
Check out the demo that is in WIP
Full Changelog: v0.2.6...v0.2.8