Constructor
new Vortex(configopt)
- Description:
- Initializes a vortex force with a center point, rotation speed, and suction speed.
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
config |
VortexConfig |
<optional> |
{}
|
Vortex configuration options. |
Extends
Classes
Members
cullingRadius :number
- Description:
- Distance threshold from the center below which particles are marked dead, surrounded by a frame-rate independent soft-aging buffer zone to prevent visual popping. Note that high velocities or long lifespans may cause particles to mathematically bypass the center and slingshot outward. In such cases, increase this radius to intercept particles before they reach their escape brink. Omit or set to 0 to disable.
- Source:
Distance threshold from the center below which particles are marked dead, surrounded by a frame-rate independent
soft-aging buffer zone to prevent visual popping. Note that high velocities or long lifespans may cause particles
to mathematically bypass the center and slingshot outward. In such cases, increase this radius to intercept
particles before they reach their escape brink. Omit or set to 0 to disable.
Type:
- number
cullingRadiusSquared :number
- Description:
- Culling radius stored internally as a squared value for high-performance comparisons.
- Source:
Culling radius stored internally as a squared value for high-performance comparisons.
Type:
- number
radius :number
- Description:
- Radius of influence. Particles outside this distance are unaffected.
- Source:
Radius of influence. Particles outside this distance are unaffected.
Type:
- number
rotationSpeed :number
- Description:
- Strength of the rotational force. Positive values rotate clockwise, negative values rotate counter-clockwise.
- Source:
Strength of the rotational force. Positive values rotate clockwise, negative values rotate counter-clockwise.
Type:
- number
suctionSpeed :number
- Description:
- Strength of the radial attraction/repulsion. Positive values pull inward, negative values push outward.
- Source:
Strength of the radial attraction/repulsion. Positive values pull inward, negative values push outward.
Type:
- number
x :number
- Description:
- Horizontal coordinate of the vortex center.
- Source:
Horizontal coordinate of the vortex center.
Type:
- number
y :number
- Description:
- Vertical coordinate of the vortex center.
- Source:
Vertical coordinate of the vortex center.
Type:
- number