An archetype is a collection of entities that share the same components. Archetypes should not be constructed directly, but rather through the World class using the World#archetype method.
new
Archetype(unnamed 0: { world: World<Entity>; entities: Set<Entity>; components: Components; without?: Array<Exclude<keyof Entity, Components[number]>>; })
readonly
components: Readonly<Components>
readonly
entities: ReadonlySet<SafeEntity<Entity, Components[number]>>
readonly
excluding: Readonly<Array<Exclude<keyof Entity, Components[number]>>>
addEntity(entity: Entity): Archetype<Entity, Components>
clearEntities(): void
removeEntity(entity: Entity): Archetype<Entity, Components>
without<Component extends keyof Entity>(...components: Component[]): Archetype<SafeEntity<Omit<Entity, (components)[number]>, Exclude<Components[number], (components)[number]>>, Array<Exclude<Components[number], (components)[number]>>>
Returns a new archetype based on the current archetype, but excludes the specified components.