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

Color connecting lines relative to boolean state #30

Open
andraz-at opened this issue Aug 17, 2020 · 2 comments
Open

Color connecting lines relative to boolean state #30

andraz-at opened this issue Aug 17, 2020 · 2 comments

Comments

@andraz-at
Copy link

All lines are gray at the moment.

Boolean flow would be easier to visualize if green line would represent true and red line false state.

Is this available or would an upgrade with dynamic css classes applied to the line dom elements be needed first?

@chrisjpatty
Copy link
Owner

This isn't currently possible, but to make it possible I think two features would be required:

  1. Theming: Styles will need to be able to be dynamically applied based on input data.
  2. Live logic resolution in the Node Editor. Right now the node editor has not built-in concept of what data is coming from input nodes, so a boolean port may not know in the editor if the data flowing through it is a true or a false. Unless of course you're intending to have a true and a false output port. Is that the case?

@andraz-at
Copy link
Author

If I'm understanding you correctly the nodes are a graphical representation of the logic network, but individual nodes never receive live data while it is getting calculated because the execution is optimized into a separate process?

Could this process get a "debug" mode or a "live" mode, where engine on purpose reduces it's own optimization to push data to the dom node's data properties while the engine is calculating data?

Calculating one output node value would imply all of the inputs and paths values which all should be equal, so this is an easy optimization enabling us to hook css styling to the data property, just copy the output data value on to the linked dom nodes.

Storing the results first into a set as they're getting calculated, and only updating dom nodes at the end, could additionally optimize the execution - if the same dom output object would get multiple changes before stabilizing this could cause redraws.

p.s.: be careful to avoid CSS spec bug for custom data attribute styling, data needs to start with a character: https://stackoverflow.com/a/21971962

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