Explore the RxJs API by managing moving particle systems. The systems should:
- Have particle movement that feels calm and natural
- Support large swarms of particles
- Be able to evade obstacles
The trickiest portion of this iteration was animating the curved paths. Elliptical geometry was the initial goal, but calculating arc length (to maintain a scalar speed) is quite difficult. Smoothstep cubic curves were also an option, but maintaining consistent entry and exit angles could affect performance for large groups. The current design uses circular paths that allow smooth changes in both direction and rotation.
This method can handle quite a few particles.
The next goal was to explore a grid-based vision system. Each particle owns a vision grid, which is compared against the global grid to detect collisions. Here's a small scale system, with the vision grid visualized: