Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Eliot Lash
    @fadookie
    I will try to update my code with a better example, I am still working on the persistence code
    Alex
    @Hatead1
    I look in data/modulesData.json and see { name: Input ... name: Output }
    Eliot Lash
    @fadookie
    ah yeah i just got that test data from one of the examples, i am trying to dump out an updated example
    Eliot Lash
    @fadookie
    also pushed to my repo
    Eliot Lash
    @fadookie
    You know what, thanks for all your help so far Alex but don't bother. I am having trouble understanding this codebase. I am giving up on rete for now and going to try litegraph.js instead. If that doesn't work out I may be back.
    Alex
    @Hatead1
    @fadookie - good luck!
    Eliot Lash
    @fadookie
    thanks!
    Sara Gholami
    @SaraGhlm
    @Hatead1 Thank you so much! That's what I was looking for.
    Alex
    @Hatead1
    @SaraGhlm You are welcome.
    Sara Gholami
    @SaraGhlm
    Hello everyone. I was wondering when the worker function is called. I'm asking this because I am creating a Rete component that has a button to collapse the component and using v-if, v-show hides the inputs and outputs. Then when you click on the content div it has an onclick function to show the elements using v-if and v-show again. However, when it's expanded again it doesn't show the values which were passed to it in the data. I'm using data in the worker function and I'm not sure how to call it to restore the values to display them. Thanks.
    Alex
    @Hatead1
    U must send data to control via control methods after show.
    this.editor.nodes.find(n => n.id === node.id).controls.get('size').setValue(10);
    Sara Gholami
    @SaraGhlm
    Thanks!
    Dante Bazaldua
    @dantes4ur_gitlab
    Hello everyone!
    Does anyone have an example of rete implemented with react and useState react hook?
    I'm trying to keep the state inside and outside the editor, but I dont know how to do it...
    Bondarenko199
    @Bondarenko199
    image.png
    Привет. Вопроси по реакт плагину. Вот этот кусок кода заставляет все ноды перерендериться, что пагубно влияет на внутренние элементы, и не только. В добавок начинает слегка проседать производительность по всему приложению если нод больше сотни. Можно ли как-то обойти этот момент, потому что по факту эта часть служит для апдейта класса на элементе.
    Alex
    @Hatead1
    Привет. А зачем по этому событию вообще что-то апдейтить?
    Bondarenko199
    @Bondarenko199
    Я не апдейчу, это код с плагина.
    Sloev [Johannes Gårdsted Valbjørn]
    @sloev
    Hi i am vetting retejs for the following logic:
    User edits a processing pipeline for an incomming jsonlines stream. Engine processes the stream and at the end outputs to another stream. I am hvaing. Ahard time figuring out if retejs is made with streams in mind and how you would invoke the engine, doesnt seem there is examples covering this specifically. Have anyone made something similar or have some examples to point to?
    Alex
    @Hatead1
    Collapse node..
    collapser.gif
    Ram Prakash
    @sharma-ram_gitlab
    I have a ReteControl with a button, onclick of this button I want call a method of a general react component which is outside the ReteControl and ReteComponent. How can do that? Is there any way to pass a method of Parent (root level <App/>) component to Rete Control button? How to establish such type of communication and passing data? Please help, and example will be much helpful.
    Ram Prakash
    @sharma-ram_gitlab
    @Hatead1 Could you please help me on the above user case - calling unrelated react component from button in rete control?
    Alex
    @Hatead1
    Sorry, no. React is not within my interest.
    Ram Prakash
    @sharma-ram_gitlab
    @Hatead1 Thanks for your reply and your link.
    The link is about interaction between two react components which is not the case in our case. Here we have React and Rete Interaction. I will create a sandbox share with you all. May be someone might have done this in past. Thanks all.
    Alex
    @Hatead1
    You can replace react-render-plugin with vue-render-plugin, nothing will change. In this case, Rete knows nothing about render methods, everything happens in a render plugin. U want send event to parent? Use callbacks!
    https://www.pluralsight.com/guides/react-communicating-between-components
    Ram Prakash
    @sharma-ram_gitlab
    @Hatead1 Can we customize the context menu of Rete and give it different look and functionality?
    Alex
    @Hatead1
    Yep, different look in Menu.vue, different functionality via event to your plugin. Like this
    editor.use(NodeMenuPlugin.default, { 
        delay: 100,
        nodeItems: node => {
            return { 
                        'Name'(){ editor.view.trigger('showinputwindow', ({node, legend: "Enter name"})) },
                        'Color'(){ editor.view.trigger('showcolorwindow', ({node})) }
                }
        }
        });
    Alex
    @Hatead1
    I use my own NodeMenuPlugin, it's fork of ContextMenuPlugin.
    image.png
    Dawid Pietrzak
    @ca1ek
    damn the documentation page for this library is miserable
    I just love that every time I mark some text a history entry is added
    and this "copy link" thing appears, completely breaking double-click to mark word, triple-click to mark paragraph
    I tried to disable scripts but of course the page won't work then.
    triple clicking scrolls the page, that's innovative
    anyways, what other library than rete do you recommend? one that has usable documentation
    Sara Gholami
    @SaraGhlm
    Hello everyone. Does anyone know how can I communicate between node editor and nodes? I have a button in the node editor and when it is clicked I want to change somethings in every node. Thanks
    Gjorche Cekovski
    @BookHouseEffect
    @SaraGhlm editor.getNodeEditor().nodes, then loop through every node
    Alex
    @Hatead1
    create event, catch, update node data..
    https://codepen.io/hatead1/pen/mdEVRdJ - quick example
    Terricide
    @Terricide

    I was wondering if you guys had any idea what I am doing wrong. At runtime I've got an image control in the node with an icon and I want to change it on the fly.

    I've tried a few different ways and one of them is trying to remove the existing control and add a new one. However even removing the existing control doesn't work the old one is still there. What am I doing wrong, I'm calling node.update after removing the control.

        var imgControl = node.controls.get('nodeImageSrc');
        node.removeControl(imgControl);
        await node.update();
    I can view the node in chromes debugger and it shows it as being gone but the UI never updates
    Terricide
    @Terricide
    if I do editor.removeNode and then editor.addNode it gets removed and added back without the icon
    Alex
    @Hatead1

    I use code

                        let cntrl = this.emitter.nodes.find(n => n.id === node.id).controls.get('group');
                        node.removeControl(cntrl); 
                        await node.update();

    and everything is removed normally

    Sara Gholami
    @SaraGhlm
    @Hatead1 @BookHouseEffect Thank you for your answer.
    I was wondering if anyone could help me with this question. When a connection is created, I'm trying to create and add another socket and connection to the node. The problem is I can't add the connection as its corresponding socket is not rendered yet! I've tried to use the "rendersocket" event but it didn't work. Does anybody know how I can add this connection? Thanks
    Alex
    @Hatead1
    @SaraGhlm step by step, please. You create input or output, not socket.
    let o=new Rete.Output(...);
    node.addOutput(o);
    await node.update();
    Now you have output (and socket), can add new connection.
    Tomas Gutierrez
    @tomgutz
    Hi, anyone has tried adding React Context on the nodes or the editor? I would like to know more on how it can be done. Thanks!
    Filipe Lukebana
    @LUK3D
    Greetings guys, could someone explain to me how to implement RETE in my Vuejs project?