wima
    Preparing search index...

    Class Query<T>

    Enables operations to be performed on specified set of components components on a World. Ensure that the component types matches up with the component names given in the second parameter of the query in lower case.

    class A {}
    class B {}

    const world = new World()
    .registerType(A)
    .registerType(B)
    const query = new Query<[A, B]>(world, ['a','b'])

    // you can now use the query to perform operations
    // on entities with components `A` and `B`
    // see the {@link Query} methods to know what operations
    // are available

    Type Parameters

    • T extends unknown[]
    Index

    Constructors

    Properties

    descriptors: TypeId[] = []

    Methods

    • Returns the number of entities on this query.

      Returns number