tsParticles - v4.0.0-beta.12
    Preparing search index...

    SpatialHashGrid for fast particle lookup

    Index

    Constructors

    Methods

    • Queries particles within a range (Circle or Rectangle)

      Parameters

      • range: BaseRange

        the range to query particles in

      • Optionalcheck: (particle: Particle) => boolean

        optional callback to check particles against, if not provided all particles will be returned

      • out: Particle[] = []

        optional output array to fill with results

      Returns Particle[]

      the array of particles within the range

    • Queries particles within a circular range

      Parameters

      • position: ICoordinates

        the center position of the circle

      • radius: number

        the circle radius

      • Optionalcheck: (particle: Particle) => boolean

        optional callback to filter particles

      • out: Particle[] = []

        optional output array to fill with results

      Returns Particle[]

      the array of particles within the circle

    • Sets the cell size (applied on next clear)

      Parameters

      • cellSize: number

        the new cell size

      Returns void