Skip to content

PicoES v1.1.1

Latest
Compare
Choose a tag to compare
@ayebear ayebear released this 23 Feb 04:24

Added entity key to entity data object, to allow a more consistent each() syntax:
world.each('comp', ({ comp }, entity) => { entity.remove(comp) })
now becomes:
world.each('comp', ({ entity, comp }) => { entity.remove(comp) })
Internally, a reference to the parent entity is inside entity.data, so you cannot have components named 'entity' anymore.