The absorber constructor, initializes the absorber based on the given options and position
the plugin manager
the Container engine using the absorber plugin, containing the particles that will interact with this Absorber
the Absorber source options
Optionalposition: ICoordinates
the Absorber optional position, if not given, it will be searched in options, and if not available also there, a random one will be used
The absorber color
The absorber size limit
The absorber mass, this increases the attraction force
Optional ReadonlynameThe absorber name, useful when retrieving it manually
The absorber opacity
Readonly InternaloptionsGets the absorber options
ReadonlyorbitsWhether the absorbed particles orbit around the absorber instead of being pulled towards it
The absorber position
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
the particle reaching the absorber
the delta time of the frame, used for calculating the growth of the absorber
The draw method, for drawing the absorber in the canvas
the canvas 2d context used for drawing
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
the point to pull towards the absorber
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
the point pulled towards the absorber
the force vector, with the capped magnitude of getAttraction
The resize method, for fixing the Absorber position
Checks if the absorber reached one of its configured size limits and should split
true if the absorber should split
Updates the absorber state, including life management
the delta time of the frame
The AbsorberInstance class manages a single absorber, handling particle attraction, orbit, destruction, and lifecycle management