Skip to main content

TagQuery <TKnownTags>

Index

Constructors

constructor

  • new TagQuery<TKnownTags>(requiredTags: TKnownTags[]): TagQuery<TKnownTags>
  • Type parameters

    • TKnownTags: string = never

    Parameters

    • requiredTags: TKnownTags[]

    Returns TagQuery<TKnownTags>

Properties

publicentities

entities: Entity<any>[] = []

publicentityAdded$

entityAdded$: Observable<Entity<any>> = ...

This fires right after the component is added

publicentityRemoved$

entityRemoved$: Observable<Entity<any>> = ...

This fires right before the component is actually removed from the entity, it will still be available for cleanup purposes

publicreadonlyid

id: string

publicreadonlyrequiredTags

requiredTags: TKnownTags[]

publictags

tags: Set<TKnownTags> = ...

Methods

checkAndAdd

  • checkAndAdd(entity: Entity<any>): boolean
  • Parameters

    Returns boolean

publicgetEntities

  • Returns a list of entities that match the query


    Parameters

    • optionalsort: (a: Entity<any>, b: Entity<any>) => number

      Optional sorting function to sort entities returned from the query

    Returns Entity<any>[]

removeEntity

  • removeEntity(entity: Entity<any>): void
  • Parameters

    Returns void

staticcreateId

  • createId(requiredComponents: string[]): string
  • Parameters

    • requiredComponents: string[]

    Returns string