RadialForce

RadialForce

Environmental force that accelerates particles radially toward or away from a central point.

Constructor

new RadialForce(configopt)

Description:
  • Initializes a radial force with a center point, strength, epsilon, and culling radius.
Source:
Parameters:
Name Type Attributes Default Description
config RadialForceConfig <optional>
{} RadialForce configuration options.

Extends

Classes

RadialForce

Members

cullingRadiusSquared :number

Description:
  • Distance threshold from the center below which particles are marked dead.
Source:
Distance threshold from the center below which particles are marked dead.
Type:
  • number

epsilonSquared :number

Description:
  • Smoothing factor to prevent divide-by-zero errors and infinite acceleration spikes near the center.
Source:
Smoothing factor to prevent divide-by-zero errors and infinite acceleration spikes near the center.
Type:
  • number

strength :number

Description:
  • Magnitude of the force. Positive values create attraction, negative values create repulsion.
Source:
Magnitude of the force. Positive values create attraction, negative values create repulsion.
Type:
  • number

x :number

Description:
  • Horizontal coordinate of the force center.
Source:
Horizontal coordinate of the force center.
Type:
  • number

y :number

Description:
  • Vertical coordinate of the force center.
Source:
Vertical coordinate of the force center.
Type:
  • number