Is there a way to create multiple separate GUIs in p5js without initialising too many global variables?
Context: I'm currently using p5gui and quicksettings to create GUIs, but I've been creating them by initialising global variables first and then creating them using "addGlobals()". With this method, I was able to create separate GUI panels on the same canvas but I'd rather minimize the use of global variables if possible.
I have considered wrapping the GUI variables into an object like
let params = {...
}
gui.addObject(params)
but it turns out that doing this combines everything together and makes up one big GUI panel. Is there a way to create multiple separate GUIs with as few global variables as possible? Like a constructor of some sort.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/1Ds6lFM
Comments
Post a Comment