.Repulsion

Proton .Repulsion

new .Repulsion(targetPosition, forceopt, radiusopt, lifeopt, easingopt)

The oppisite of Proton.Attraction - turns the force

Properties:
Name Type Description
force Number
name String

The Behaviour name

Source:
To Do:
  • add description for 'force' and 'radius'
Parameters:
Name Type Attributes Default Description
targetPosition Proton.Vector2D

the attraction point coordinates

force Number <optional>
100
radius Number <optional>
1000
life Number <optional>
Infinity

this behaviour's life

easing String <optional>
Proton.easeLinear

this behaviour's easing

Extends

Methods

applyBehaviour(particle, time, index)

Apply this behaviour for all particles every time

Inherited From:
Source:
Parameters:
Name Type Description
particle Proton.Particle
time Number

the integrate time 1/ms

index Int

the particle index

reset(targetPosition, forceopt, radiusopt, lifeopt, easingopt)

Reset this behaviour's parameters

Overrides:
Source:
To Do:
  • add description for 'force' and 'radius'
Parameters:
Name Type Attributes Default Description
targetPosition Proton.Vector2D

the attraction point coordinates

force Number <optional>
100
radius Number <optional>
1000
life Number <optional>
Infinity

this behaviour's life

easing String <optional>
Proton.easeLinear

this behaviour's easing