-
Notifications
You must be signed in to change notification settings - Fork 0
/
utilities.js
36 lines (27 loc) · 861 Bytes
/
utilities.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* Various Utilities
*/
/**
* Simple parameter adjustment GUI
* uses p5.gui
* > https://github.com/bitcraftlab/p5.gui
* which wraps the quicksettings library which you can access
* through .prototype for extra functionality
* > https://github.com/bit101/quicksettings
*/
let _paramGui;
function createParamGui(params, callback) {
// settings gui
_paramGui = createGui('Settings');
// settingsGui.prototype.addButton("Save", function () { storeItem("params", settings) });
_paramGui.addObject(params)
if (callback)
_paramGui.prototype.setGlobalChangeHandler(callback)
// settingsGui.prototype.addRange('size', 1, 64, 32, 1, function(v) { print("size changed", v) } )
_paramGui.setPosition(width + 10, 10);
// the 'S' key hides or shows the GUI
_paramGui.prototype.setKey("s");
}
function testtest() {
print("here")
}