TeamAtomECS / AtomECS

Cold atom simulation code
GNU General Public License v3.0
46 stars 11 forks source link

Plugin Workflow #73

Closed ElliotB256 closed 2 years ago

ElliotB256 commented 2 years ago

bevy has a really nice implementation of 'Plugins', where you can define individual parts of a program to add/remove. A similar plugin model could be used in AtomECS to add different models of laser cooling, different forces, collisions, etc. This would improve the usability and increase program flexibility (possibly also performance by only running required/declared modules).

Related to #3.

ElliotB256 commented 2 years ago

First draft in 37c286f

minghuaw commented 2 years ago

Is there any good reason that Plugin::build takes &self instead of self?

ElliotB256 commented 2 years ago

Good point, it probably should be self - the plugin should be consumed by the process, not borrowed