Giter Club home page Giter Club logo

Comments (8)

jagenjo avatar jagenjo commented on May 17, 2024 1

ok, I added the network/websocket component, it allows to send different data through different channels.
I also added a network/sillyclient that connects to a sillyserver which bounces packets back to all connected users, for more info: https://github.com/jagenjo/SillyServer.js

I havent tested the websockets one, but the sillyserver works perfectly

from litegraph.js.

jagenjo avatar jagenjo commented on May 17, 2024 1

I uploaded a version yesterday that has the "only send changes" which will only send the data if it changes. Update to the newer version to get the changes.

from litegraph.js.

brucelane avatar brucelane commented on May 17, 2024

thank you for the websocket support, I would like it to send data from knobs, sliders, etc.
It seems it only supports some room chat messages right now.

from litegraph.js.

jagenjo avatar jagenjo commented on May 17, 2024

are you using the sillyserver or the websocket?

from litegraph.js.

brucelane avatar brucelane commented on May 17, 2024

your websocket module with my nodejs websocket server, this works fine:

this._ws.onopen = function()
{
	console.log("ready");
	that.boxcolor = "#8E8";
	that._ws.send( JSON.stringify({ type:1, msg: "data" }) );
}
this._ws.onmessage = function(e)
{
	console.log("_ws.onmessage" + e);

from litegraph.js.

brucelane avatar brucelane commented on May 17, 2024

so how can I send a websocket message when I change the slider value?

from litegraph.js.

jagenjo avatar jagenjo commented on May 17, 2024

just plug the slider value to the IN field in the websocket node and press play
it will send a message every time it detects the value has changed.

from litegraph.js.

brucelane avatar brucelane commented on May 17, 2024

yes, easy one, sorry!
I had to rework my websocket server code to match your incoming messages.
It seems that messages are always sent even if the slider value doesn't change.
I would need to add an output to the text node to send the text via websocket.

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.