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

Breadth first traversal #1

Open
ikeough opened this issue Dec 19, 2021 · 2 comments
Open

Breadth first traversal #1

ikeough opened this issue Dec 19, 2021 · 2 comments

Comments

@ikeough
Copy link

ikeough commented Dec 19, 2021

Great start on a flow editor! I came to to the project because I saw Ricardo Cabello using it for a shader editor for three. I'm trying out the library to build a UI for an in browser geometry modeler based on our C# library Elements.

Im wondering if there are currently built in methods to traverse the connected graph. I see linkedElement that enables me to build this. Just wondering if there was anything out of the box.

@sunag
Copy link
Owner

sunag commented Dec 20, 2021

hi @ikeough . I will update this week and rename some methods, for example: linkedElement to getLinkedElement() .
I can include a function to transverse the connections too.

@ikeough
Copy link
Author

ikeough commented Dec 25, 2021

Thanks @sunag. Also happy to help. It took me a little while to figure out that a link's outputElement was the start of the link and the inputElement was the end of the link. If I've got that right, then the last trick in traversal is that I don't know how to get from a node to its inputs/outputs to the links. The links have references to the nodes, but the nodes just get a collection of links that they are associated with and you have to match up the associated elements. Would be more straightforward if you could go node->output element->link->input element ->node->... Perhaps you can and I'm missing how to do it.

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