Constructor
new PowderForce(radius, pScale, restDensity)
Instantiates new PowderForce
behavior object
Name | Type | Description |
---|---|---|
radius | Number | effective radius, determines the area of which density is sampled from |
pScale | Number | density relaxation scaling constant |
restDensity | Number | target resting density (there are no units, its an approximate value) |
- Source
Extends
Methods
applyBehavior(particle, particles, timeStep)
Calculates and applies the powder force relaxation
- Overrides
- Source
applyCorrection(particle, particles)
This class does not require final position corrections
- Overrides
- Source
findDensity(particle, particles) → {Array.<Number>}
Calculates the approximate density within the effective radius of the particle
- Source
an array of 2 numbers, [density, nearDensity]
- Type:
- Array.<Number>
range() → {null}
Returns the effective range / defines the size of the nearby range
- Overrides
- Source
- Type:
- null