Options
All
  • Public
  • Public/Protected
  • All
Menu

Evidently Data Structures library

Index

Type aliases

Grid2DIterateCallback

Grid2DIterateCallback<TElement>: function

This is a type alias for a function that's called when iterating over values in the Grid2D, and called by the destructive operation.

Type parameters

  • TElement

    The type of the element as provided by Grid2D used.

Type declaration

    • (element: TElement, x: number, y: number): void
    • Parameters

      • element: TElement

        Element in question

      • x: number

        X position in the grid.

      • y: number

        Y position in the grid.

      Returns void

Grid2DValueProvider

Grid2DValueProvider<TElement>: function

This is a type alias for a function that's supposed to provide Grid2D with a value for a specific space.

Type parameters

  • TElement

    The type of the element as provided by Grid2D used.

Type declaration

    • (x: number, y: number): TElement
    • Parameters

      • x: number

        X position in the grid.

      • y: number

        Y position in the grid.

      Returns TElement

      The value to store in that space

PoolHydrateCallback

PoolHydrateCallback<TObject>: function

Type parameters

  • TObject

Type declaration

    • (): TObject
    • Returns TObject

PoolReleaseCallback

PoolReleaseCallback<TObject>: function

Type parameters

  • TObject

Type declaration

    • (element: TObject): void
    • Parameters

      • element: TObject

      Returns void

SpatialGrid2DDestroyCallback

SpatialGrid2DDestroyCallback<TElement>: function

This is a type alias for a function that's called on each element that is removed in the resize operation.

Type parameters

  • TElement

    The type of the element as provided by SpatialGrid2D used.

Type declaration

    • (element: TElement, x: number, y: number): void
    • Parameters

      • element: TElement

        Element in question

      • x: number

        X position in the grid.

      • y: number

        Y position in the grid.

      Returns void

SpatialGrid2DFilterCallback

SpatialGrid2DFilterCallback<TElement>: function

This is a type alias for a function that's called in getFiltered

Type parameters

  • TElement

    The type of the element as provided by SpatialGrid2D used.

Type declaration

    • (element: TElement, x: number, y: number): boolean
    • Parameters

      • element: TElement

        Element in question

      • x: number

        X position in the grid.

      • y: number

        Y position in the grid.

      Returns boolean

      True when element should be kept in the resulting array

Variables

Private Const itemPool

itemPool: FastPool<Item<any>> = new FastPool<Item<any>>(() => {return {x: 0, y: 0, value: undefined as any};})

Generated using TypeDoc