I know there is Unity Bolt and Unreal Blueprints for generating node-based interactions within their given platforms. I know there are things like Twine [1] for helping tell interactive/non-linear stories. Twine is actually close to what I am looking for, but I am wanting something that can be embedded rather than generating hypertext stories.
My phrasing could be off, but I hope that conveys what I am looking for. Also, would prefer opensource.
[1] https://twinery.org