Simple electrodynamics demo
Physics-related code is in physics.js.
This file defines the update() which advances the state by a single timestep.
The rest of the code is in sketch.js and it is split into four sections:
- The definition of the
p5.jsfunctionssetup()anddraw() - Drawing functions
- Useful helper functions
- Events