Open EriKWDev opened 3 years ago
The relevant file in the project is src/nanim/animation/animations.nim
(https://github.com/EriKWDev/nanim/blob/fea656276374bbbb673b87245f0503f56fe707ec/src/nanim/animation/animations.nim)
All those animations are very copy-paste-y and would benefit enormously from template or macro.
I tried doing a
simpleSingleValueTween
template here, but when I did some testing later it seemed like it really didn't work as I expected. Currently, a lot of tweens follow a very copy-paste-ey pattern which seems ideal for a template, but I currently don't know enough about the system to get it to work.Anyone with more experience in Nim or time to get it to function properly are welcome to Fix the issue :)
This is what my attempt looked like:
but it seemed like the untyped
valueName
didn't quite work. It would also be nice to support multiple valueNames in avararg[untyped]
kind-of way, but that would require a macro.