A ๐ฉโ๐ป developer-friendly entity management system for ๐น games and similarly demanding applications, based on ๐ ECS architecture.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
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)} />
</>
)
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
<ECS.Entities bucket/entities/where>
Published by github-actions[bot] almost 2 years ago
world.archetype
is gone. Instead, there is world.where(predicate)
. For archetype queries, please use world.where(archetype("foo", "bar"))
.Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 2 years ago
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"] }} />
Published by github-actions[bot] almost 2 years ago
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
.
Published by github-actions[bot] almost 2 years ago
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. :-)Published by github-actions[bot] about 2 years ago
Published by github-actions[bot] about 2 years ago
Published by github-actions[bot] about 2 years ago
Published by github-actions[bot] about 2 years ago
add
to return the input entity's type. This is an experimental change that may be reverted.Published by github-actions[bot] about 2 years ago
Published by github-actions[bot] about 2 years ago
Published by github-actions[bot] about 2 years ago
id(entity)
export has been removed, and replaced with a World
-specific ID mechanism, world.id(entity)
and world.entity(id)
.World
are now once again called addComponent
, setComponent
and removeComponent
, and the React component has been renamed from <Property>
to <Component>
.Published by github-actions[bot] about 2 years ago
id(entity)
export has been removed, and replaced with a World
-specific ID mechanism, world.id(entity)
and world.entity(id)
.World
are now once again called addComponent
, setComponent
and removeComponent
, and the React component has been renamed from <Property>
to <Component>
.Published by github-actions[bot] about 2 years ago
as
prop to Entity
, Entities
, Bucket
and Archetype
. (#145)