miniplex

A ๐Ÿ‘ฉโ€๐Ÿ’ป developer-friendly entity management system for ๐Ÿ•น games and similarly demanding applications, based on ๐Ÿ›  ECS architecture.

MIT License

Downloads
15.2K
Stars
764
Committers
10

Bot releases are visible (Hide)

miniplex - [email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

miniplex - [email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

miniplex - @miniplex/[email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

  • a0ae381: <Entities> has been changed to always take an in prop.

    const bullets = ECS.world.where(archetype("isBullet"))
    
    const Bullets = () => (
      <>
        {/* Query form */}
        <ECS.Entities in={archetype("isBullet")} />
    
        {/* Bucket form */}
        <ECS.Entities in={bullets} />
    
        {/* Array form */}
        <ECS.Entities in={bullets.entities.slice(0, 5)} />
      </>
    )
    
miniplex - [email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

miniplex - @miniplex/[email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

  • 15d7c38: <ECS.Entities bucket/entities/where>
miniplex - @miniplex/[email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

  • 252cc0f: world.archetype is gone. Instead, there is world.where(predicate). For archetype queries, please use world.where(archetype("foo", "bar")).
  • Updated dependencies [252cc0f]
miniplex - @miniplex/[email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

  • 252cc0f: Extracted Bucket into its own micropackage, yay!
miniplex - [email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

miniplex - @miniplex/[email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

  • a886264: createComponents has been renamed to createReactAPI and is now the default export of both @miniplex/react and miniplex/react, in order to allow the user to pick a less terrible name. :-)

  • 43f9cae: Upgraded to a newer @hmans/event that uses .add and .remove instead of .addListener and .removeListener.

  • b11083d: <Archetype> has been changed to match the new query capabilities of the core library's world.archetype function. All of these are now valid:

    <Archetype query="position" />
    <Archetype query={["position", "velocity"]} />
    <Archetype query={{ all: ["position", "velocity"], none: ["dead"] }} />
    
miniplex - @miniplex/[email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

  • b11083d: Aaaaah, another rewrite of the core library! @miniplex/core kept the same lightweight core, but the World is now much more aware of archetypes and what kind of entities they represent. This was done to allow for better introspection and to fix some remaining issues like #204].

    The WithRequiredKeys type has been renamed to WithComponents.

    world.archetype() now allows two forms:

    world.archetype("position", "velocity")
    world.archetype({ all: ["position", "velocity"] })
    

    The second form involves a query object that can also have any and none keys:

    world.archetype({
      all: ["position", "velocity"],
      none: ["dead"]
    })
    

    Breaking Change: bucket.derive() has been removed. It was cool and fun and cute, but also a little too generic to be useful. Similar to Miniplex 1.0, there is only the world and a series of archetypes now. (But both share the same lightweight Bucket base class that can also be used standalone.)

  • 43f9cae: Upgraded to a newer @hmans/event that uses .add and .remove instead of .addListener and .removeListener.

miniplex - [email protected]

Published by github-actions[bot] almost 2 years ago

Patch Changes

  • a886264: createComponents has been renamed to createReactAPI and is now the default export of both @miniplex/react and miniplex/react, in order to allow the user to pick a less terrible name. :-)
  • Updated dependencies [a886264]
  • Updated dependencies [b11083d]
  • Updated dependencies [43f9cae]
  • Updated dependencies [b11083d]
miniplex - @miniplex/[email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

  • 504086b: Miniplex will now log errors (but not throw) when trying to add components that already exist on the entity, or remove or update components that don't.
  • 504086b: Fixed a bug around removal of entities from buckets.
miniplex - [email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

miniplex - @miniplex/[email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

  • 504086b: Strict Mode fixes.
miniplex - @miniplex/[email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

  • 873381c: Changed type signature of add to return the input entity's type. This is an experimental change that may be reverted.
miniplex - [email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

miniplex - [email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

miniplex - @miniplex/[email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

  • 5a5244e: The global id(entity) export has been removed, and replaced with a World-specific ID mechanism, world.id(entity) and world.entity(id).
  • c28a404: From "properties" back to "components". The methods on World are now once again called addComponent, setComponent and removeComponent, and the React component has been renamed from <Property> to <Component>.
miniplex - @miniplex/[email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

  • 5a5244e: The global id(entity) export has been removed, and replaced with a World-specific ID mechanism, world.id(entity) and world.entity(id).
  • 6808a5d: All buckets can now be instantiated with an initial list of entities.
  • c28a404: From "properties" back to "components". The methods on World are now once again called addComponent, setComponent and removeComponent, and the React component has been renamed from <Property> to <Component>.
miniplex - @miniplex/[email protected]

Published by github-actions[bot] about 2 years ago

Patch Changes

  • 8b79340: Added the as prop to Entity, Entities, Bucket and Archetype. (#145)