You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could some kind soul help me with this? In a p5.js.gui I would like to tell the gui there is a specific callback to service changes in any of the controls. Is this possible? How do I do it? It would be similar to the following call on Quicksettings:
qs.setGlobalChangeHandler(callback);
However, I don't seem to have access to this after I create a gui with
let gui = createGui('p5.gui');
gui.addObject(glob.ui);
gui.setPosition(20, 60);
I would like to do something like
gui.setGlobalChangeHandler(callback);
The text was updated successfully, but these errors were encountered:
Hey @dan-reznik,
I don't know if you still could use this. But I just tried to hack something together, and found you could create an object with custom setters and getters and allow the gui to modify the object through built-in .addObject() functionality.
I just needed this and found out you can access Quicksettings by calling gui.prototype.
This way you can have different callbacks for different GUI elements, for example with an Input Slider:
Could some kind soul help me with this? In a p5.js.gui I would like to tell the gui there is a specific callback to service changes in any of the controls. Is this possible? How do I do it? It would be similar to the following call on Quicksettings:
However, I don't seem to have access to this after I create a gui with
I would like to do something like
The text was updated successfully, but these errors were encountered: