You might want to look into using Observables? I know BabylonJS uses them a bunch to manage reacting to events.
https://doc.babylonjs.com/how_to/observables
I was inspired by this article, maybe you’d find a good jumping off point.
pinging @Deltakosh?
Edit: Oh hey someone else on the forum kinda agreed with me!
2 Likes