Hi!
I implemented a state management in a project using Vuex. I use loose coupling betwen the State, the UI (Quasar/Vue) and the BabylonJS scene using messaging.
UI → State → SceneDirector (responsible for puppeting the entities on the scene) → MessageQueue → BJS (and the whole process backwards) The State is changed by external inputs like thermal, prerssue, co2, sensors etc. as well.
I wrote about a simplified version (no Vuex involved) of the implementation here. Maybe worth to check: