Multiple instances on external site #666
-
Hi! I am embedding dials designed in Cables for a native WebView based plugin. Still trying to decide if that is a good idea or not. I like the design flow in Cables, the export to GitHub ( and easy sync via git submodule ) - but wondering if it is practical to have as many instnces of CABLES running, as there are GUI widgets. One advantage is that I can use my own layout and other stuff handling and scaling multiple canvas elements running Cables sketches. I have done that and stored each Cables patch instance in a Svelte store. Proof of Concept works. Wondering if that is viable in terms of scaling though. Should I try to build the whole GUI, including Widget instances and layout in one Cable sketch and export that? Or can I instantiate one CABLES global object target multiple Canvasses running the same Patch code? I am guessing this is something Cables dev crew have thought about, considering the move to native dev... |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
hey, not really sure how this relates to "native dev" and what you mean by that :) having one patch for each element seems like a very weird idea, if you go that way you can use cables-cli (https://github.com/cables-gl/cables-cli) to at least export and use the cables core code only once (via the wouldnt it be somehow better to have the whole experience in one "widget" and then handle state in cables. not really sure about "svelte" and what exactly "gui widgets" are though. |
Beta Was this translation helpful? Give feedback.
-
I'm still finding it testing to render an arbitrary number of interactive widgets, like Faders or Dials, and get values from them each independently, using the Grid or Repeat2D . Not sure if I am getting confused about the simple way to do this. |
Beta Was this translation helpful? Give feedback.
-
@steam0r I invited you and @pandrr to the patch, because there's weirdness that I can't fathom, over in the Data section. Why doesn't the array store the values from the hits? It seems to be creating a new array everytime, so I can't do much in terms of state on each interactive widget. |
Beta Was this translation helpful? Give feedback.
I figured something out.
Thanks for you help!