Comments (3)
Hi,
Technically yes, thats the function that iterates through every node calling the onExecute on them.
But what I do not understand is why you want something that is not asyncronous to be asynchronous when onExecute methods are not depending on external stuff.
I mean, you can wrap it if you want, but it is still a sync code called from an async wrapper.
The only use case I can imagine is if one node relies on some async actions, but in that case it will be harder that wrapping onExecute, you will need to call onExecute on the next node after the async onExecute of this node finishes, and that would take some time to code. I guess you can create a runStepAsync that handles promises in some sort of onExecuteAsync per node, but then you will have to handle which nodes are sync and which ones aren't.
Tell me more about your use-case
from litegraph.js.
That's exactly what I'm going for.
I want to use litegraph in a different way (nonrealtime) than it's currently designed.
About the usecase, i want to configure a node with an url, so it can fetch an url during onExecute.
I'm going to see if i can get a runStepAsync going.
It's very easy to distinguish between async & sync onExecute-functions, as i only have to check the type of their output (promise or not).
from litegraph.js.
Well, I though about it too some time ago, and my approach was more focused in events, similar to how UDK4 Blueprints work, where a node can dispatch an event, and you can wire events between boxes.
The current approach is more for signal processing (take one input, process it, generate output).
LiteGraph currently supports events, it is not well documented, but the feature is there. The idea is that you can declare event inputs/outputs and connect them, and from a node you can dispatch them using the method trigger. This will execute independently of runStep.
Let me know your advances.
from litegraph.js.
Related Issues (20)
- size not working
- Can we render link in different colors by its value? HOT 1
- Question: Creating a NESTED canvas?
- [Feature Req] Ability to distribute nodes (vertically or horizontally)
- Create a Basic Color node or Widget HOT 1
- computeConnectionPoint doesn't respect links_render_mode
- is there an onGraphChange() or onCanvasChange() event? HOT 1
- question: how to use ui for (*custom*) python code generation? HOT 2
- The method mounted on global in the ES Modules environment throws an error
- Linting question
- Preview of what link is sending to node doesn't work after saving and reloading with configure HOT 1
- Text button and prompt dialog
- Background turns black when zooming out
- how to render a different link color when mouseover a link?
- Getting the coordinates on a graph
- How to realize redo and undo? HOT 1
- When the canvas attribute size and CSS style size are inconsistent, interactive events such as clicking on nodes fail. HOT 1
- Bootstrap 5.0.2 makes "Add Node" invisible
- Issue with Output Port Position Adjustment
- Numberpad enter creates a new line in input field of the properties.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from litegraph.js.