This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
Replies: 1 comment 4 replies
-
Hi! Thanks for your interest in the library 😄 This idea of event graphs for robots sounds pretty exciting! The things you are mentioning are all very well aligned with my vision for this library. And, in fact, all three features are things I'd been considering before. The implementation you suggest looks exactly as I would've gone for, so looking good :) I do not have a lot of time to add new features right now, but I'd be more than happy to review and accept any PRs you send with these changes! |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm very excited to learn about this crate! I'm going to be working on an event graph framework and I'd love to be able to build on top of
egui_node_graph
and contribute back feature enhancements.I'd like to list out a couple of changes to
egui_node_graph
that I think would be necessary to fit our needs so I can understand whether you'd be amenable to the changes (or have better ideas for how to do things) before I dive straight into making a PR. I'm happy to create a separate issue ticket for each of these items, but I thought I'd bundle it all up in one discussion topic for now since it all relates to my specific needs.1. Function instead of
Eq
for testing data compatibilityIt seems the
DataTypeTrait
uses itsPartialEq + Eq
trait bounds to determine if two data types are compatible. In my use case, there are separate sets of types for inputs and outputs. Certain output types can connect to certain input types, and it's not a 1:1 relationship. It would be helpful ifDataTypeTrait
exposed a method likewhere
self
would be an input port andfrom_output
is an output port, and it returns abool
for whether they can connect.One solution would be to have this:
Alternatively if
Eq
is a trait thatDataTypeTrait
always requires for some other purpose, then we could havefn is_compatible(...)
be a method ofDataTypeTrait
with a default implementation of*self == *from_output
which users can override for more custom behavior.2. Custom symbol rendering
To give a greater range of expression for inputs and outputs it would be nice if we could customize the port drawing of each data type instead of only differentiating them by color.
Maybe we could have something like
3. Anchor points for connections
It's really great that loops are supported, for example:
However as you can see there's an ugly cross-over since the simple Bezier curve has trouble going backwards. It would be great if we could click+drag on a connection line to create an anchor point for the Bezier curve to manually pull it around the the boxes.
An even nicer long-term solution would be to use a little path search algorithm to find a collision-free path for the connection, but that's obviously a much more advanced feature which could be added later on top of the anchor point feature.
Beta Was this translation helpful? Give feedback.
All reactions