Remove all entities, components, caches, pools, and listeners.
Create a new entity, reusing a recycled ID when available.
Clear the registry and restore state from a JSON string produced by serialize().
Destroy an entity, removing all its components and hierarchy links.
Check whether an entity has a given component type.
Register a component class for serialization under the given name.
Remove a component from an entity, triggering onRemoved listeners and pooling the instance.
Serialize all entities and registered components to a JSON string.
Set or clear an entity's parent, updating Parent/Children components on both sides.
Query entities matching a set of component types. Results are cached.
Accepts either component classes as rest args, or a QueryConfig with with/without arrays.
Query entities matching a set of component types. Results are cached.
Accepts either component classes as rest args, or a QueryConfig with with/without arrays.
Central ECS registry that manages entities, components, views, and hierarchy.
Supports component pooling, cached archetype views, event hooks, and JSON serialization.