Open TashaSkyUp opened 1 year ago
@TashaSkyUp
I would like to help, but I haven't heard of litegraph before and after a look at its documentation, I don't understand how it is supposed to work (for instance, I haven't found what app.registerExtension
is supposed to do, or why there is a beforeRegisterNodeDef
async function).
Can you provide a complete example (HTML and Javascript, client and server side) of something that works (for instance, the same as what you would like to do with Brython, but with Javascript code instead of Brython) so that I can see how it could be adapted ?
@PierreQuentel Thank you for your interest, the idea is to be able to write nodes in brython for this project which uses lightgraph.js
https://github.com/comfyanonymous/ComfyUI
if you look at https://github.com/comfyanonymous/ComfyUI/tree/master/web/extensions
this is where litegraph.js likes to load extensions from
furthormore see https://github.com/comfyanonymous/ComfyUI/blob/master/web/extensions/logging.js.example
for an example extension
The comfyui project uses a python backend server and a litegraph.js enabled client. in the python server custom node definitions are defined and the transported to the client where litegraph renders them via a set of rules involving nodes and widgets etc etc. The idea is to enable quicker development of custom nodes and widgets, within the python code base via brython!
Ive tried so many different ways of making it work I cant even remember where I am any longer.. I think this version above complains about cors..
the idea is, there is a python backend, a js litegraph frontend. I'm trying to send brython code from the python backend to the client to be executed.