Giter Club home page Giter Club logo

Comments (3)

jagenjo avatar jagenjo commented on May 17, 2024

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.

coderofsalvation avatar coderofsalvation commented on May 17, 2024

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.

jagenjo avatar jagenjo commented on May 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.