pixi.js
    Preparing search index...

    Class PoolGroupClassAdvanced

    A group of pools that can be used to store objects of different types.

    Index

    Constructors

    Methods

    • Gets an item from a specific pool.

      Type Parameters

      • T extends PoolItem

        The type of items in the pool. Must extend PoolItem.

      Parameters

      • Class: PoolItemConstructor<T>

        The constructor of the items in the pool.

      • Optionaldata: unknown

        Optional data to pass to the item's constructor.

      Returns T

      The item from the pool.

    • Gets a specific pool based on the class type.

      Type Parameters

      • T extends PoolItem

        The type of items in the pool. Must extend PoolItem.

      Parameters

      Returns Pool<T>

      The pool of the given class type.

    • Prepopulates a specific pool with a given number of items.

      Type Parameters

      • T extends PoolItem

        The type of items in the pool. Must extend PoolItem.

      Parameters

      • Class: PoolItemConstructor<T>

        The constructor of the items in the pool.

      • total: number

        The number of items to add to the pool.

      Returns void

    • Returns an item to its respective pool.

      Parameters

      • item: PoolItem

        The item to return to the pool.

      Returns void

    • gets the usage stats of each pool in the system

      Returns Record<string, { free: number; size: number; used: number }>