Readonly
capacityThe maximum number of entities the world can hold
Readonly
versionMiski version
the number of active entities
the number of available entities
Creates a function to add a given set of components to an entity
A function which takes an entity and optional properties object
if one or more components are not registered in this world
Rest
...components: Component<any>[]One or more components to add
Optional
properties: Record<string, SchemaProps<unknown>>Get all the changed entities from a set of components
An array of entities
if one or more components are not registered in this world
Rest
...components: Component<any>[]The components to collect changed entities from
Get this world's instance of a component
The component instance or undefined if the component is not registered
The component to retrieve the instance of
Get this world's instances of a set of components
An array of component instances or undefined if the component is not registered
Rest
...components: Component<any>[]Get all of the component properties of a given entity
An object where keys are component names and properties are the entity's properties
The entity to retrieve the properties of
Get all the components positively associated with a query
An object where keys are component names and properties are component instances
If the query is invalid
The query to get the components from
Create a function to test entities for a given component
A function which takes an entity and returns true if the entity has the component, false if it does not or null if the entity does not exist.
if the component is not registered in this world
The component to test for
Create a function to test entities for a given component
A function which takes an entity and returns true if the entity has the component, false if it does not or null if the entity does not exist.
if the component is not registered in this world
Create a function to test entities for a given component
A function which takes an entity and returns an array of true if the entity has the component, false if it does not or null if the entity does not exist.
if one or more component is not registered in this world
Rest
...components: Component<any>[]The components to test for
Create a function to test entities for a given component
A function which takes an entity and returns an array of true if the entity has the component, false if it does not or null if the entity does not exist.
if one or more component is not registered in this world
Creates a function to remove a given set of components from an entity
A function which takes an entity
if one or more components are not registered in this world
Rest
...components: Component<any>[]One or more components to remove
Generated using TypeDoc
Create a new World object
Throws
If the spec is invalid