tsParticles - v4.5.3
    Preparing search index...

    The AbsorberInstance class manages a single absorber, handling particle attraction, orbit, destruction, and lifecycle management

    Index
    color: IRgb

    The absorber color

    The absorber size limit

    mass: number

    The absorber mass, this increases the attraction force

    name?: string

    The absorber name, useful when retrieving it manually

    opacity: number

    The absorber opacity

    options: Absorber

    Gets the absorber options

    orbits: boolean

    Whether the absorbed particles orbit around the absorber instead of being pulled towards it

    position: Vector

    The absorber position

    size: number

    The absorber size, great size doesn't mean great mass, it depends also on the density

    • The contact part of the attraction, the absorber absorbs and grows when the particle reaches it. The force itself is reported by getForce and composed by the caller, so this absorber never writes the particle velocity nor its position and can never overwrite what another absorber of the same frame contributed

      Parameters

      • particle: OrbitingParticle

        the particle reaching the absorber

      • delta: IDelta

        the delta time of the frame, used for calculating the growth of the absorber

      Returns void

    • The attraction this absorber exerts on a point, the same value is used as the force applied to the particle velocity and as the weight of this absorber inside the orbit field

      Parameters

      • point: ICoordinates

        the point to pull towards the absorber

      Returns number

      the attraction magnitude, capped so a point sitting on the absorber centre can't produce an infinite force

    • The force this absorber exerts on a point, as a vector pointing from the point towards the absorber. Forces of this kind are meant to be summed as vectors: an absorber on the opposite side of the particle cancels the previous one, instead of overwriting or adding up its magnitude

      Parameters

      Returns Vector

      the force vector, with the capped magnitude of getAttraction