Refactors particle system from yesterday:
- uses
abstract class BasicParticle
to createSimpleVehicle
. - make type definitions
DrawableVehicle
that is passed to theshowVehicle
function.
Video Info
- coding train link: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/5-autonomous-agents/2-seeking-a-target
- video in playlist: https://www.youtube.com/watch?v=p1Ws1ZhG36g&list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM&index=39
- code: https://editor.p5js.org/codingtrain/sketches/AxuChwlgb
Instructions
Move the mouse to have the vehicle seek the target. Once the vehicle has arrived move the mouse quickly to shake it off.
- "l" to start or stop the the running sketch