NearBehavior

Abstract class that represents nearby interactions. This type behavior will influence, or is dependent on a set of particles in its near proximity

Interface cannot be instantiated

Methods

(abstract) applyBehavior(particle, timeStep, particles)

Apply behavior on particle and/or particles

Parameters:
NameTypeDescription
particleParticle

main particle

timeStepNumber

time step of simulation

particlesArray.<Particle>

surrounding particles

(abstract) applyCorrection(particle, particles)

Apply a positional correction to particle and/or particles

Parameters:
NameTypeDescription
particleParticle
particlesArray.<Particle>

(abstract) range() → {Array.<Number>}

Returns the effective range / defines the size of the nearby range

Returns:

pair of rectangular dimensions [number, number] that represent the effective range

Type: 
Array.<Number>