Container for entity and archetype management.
addEntityComponents<>(): T & Record<component, value>
archetype<Components extends Array<keyof Entity>>(...components: Components): Archetype<SafeEntity<Entity, (components)[number]>, components>
Returns a new archetype that will guarantee that all entities within it will have the given components.
clearEntities(): void
Removes all entities from the world and all archetypes.
createEntity<T extends Entity>(entity: T): keyof entity extends never ? never : Pick<Entity & T, keyof entity>
Create an entity with the given components. This is a type-safe version but it is of a point in time. When the entity is created. So don't rely on it to be type-safe in the future when used within systems.
deleteEntity(entity: Entity): boolean
removeEntityComponents<>(entity: T,...components: Array<Component>,): void