Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow editor - show values next to input nodes as they are updated #160

Open
oveddan opened this issue Nov 22, 2022 · 2 comments
Open

Flow editor - show values next to input nodes as they are updated #160

oveddan opened this issue Nov 22, 2022 · 2 comments

Comments

@oveddan
Copy link
Collaborator

oveddan commented Nov 22, 2022

In the flow editor, there is no way to know what value is being set in each input, without using some internal console.logs. It would be great if in the flow editor, when a data edge is attached between output/input, the value gets shown on the input node:

Screenshot 2022-11-21 at 11 32 49 PM

is there a way, from the outside of the engine, to subscribe to when a node's input gets updated? This way we could potentially display that value in the node.

@oveddan oveddan changed the title Flow editor - show values on nodes as they are updated Flow editor - show values next to input nodes as they are updated Nov 22, 2022
@bhouston
Copy link
Owner

I created a function that can evaluate those at any time now....

https://github.com/bhouston/behave-graph/blob/main/packages/core/src/Execution/resolveSocketValue.ts

So you just need to figure out when to call this function. Technically it isn't very slow -- so you could, after every graph change, call this on every input socket? That would scale for at least a hundred or so nodes, and then eventually you'll have to be a bit smarter.

@oveddan
Copy link
Collaborator Author

oveddan commented Nov 22, 2022

Nice this is useful! What about a way for those nodes to emit a value when they get a new one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants