you basically have it correct. i was being lazy though and really the movement code should be removed from the particle update and instead the particles should be fed a force using the addForce method from outside. this whole thing follows Daniel’s work closely (for good reason
) so it might be worth checking out this video
and he might have actually made an updated version of that as well.
further you can read more on his book The Nature of Code website here