A truly general framework will be tough, because of the different nature of different types of content. For example, even within physics I am working on a quantum simulation, where the simulation and interactions with it will be very different from the electric field examples. Perhaps for some very general interactions, eventually… I will definitely be evolving in that direction – for example making the electric field models easier to edit.
I have advocated this approach at a number of conferences, but the reception from companies has been lukewarm at best. They are able to sell content with limited interactivity, and the cost for this is comparatively high.
All of this content is founded in correctness, and in research proven instructional design principles, which do include gamification.
BTW, all of the code is openly licensed, and I encourage its reuse and solicit feedback on functionality and future directions.