panel#
optionoav-p5?oav_panel=closed | open | off
Whether the 🎹 panel starts shut, open, or does not exist: closed, open or off.
closed shows just the small 🎹 button, and pressing it opens the panel: the on-screen controller, the buttons for 🎤, 🔊, 🥁, ⏺, 📷, 📱 and 🩺. open opens the panel as soon as the page loads, for a workshop where everyone needs the on-screen controller at once. off removes the 🎹 button altogether, for a piece in an exhibition: there is no button and OAVp5.panel.open() does nothing. The cards that explain a problem still appear in the corner, unless hints is off too.
- Type
String- Values
closed | open | off- default
closed
Any value except open and off means closed.
Notes
- With
offeverything the panel does is still there as code:startMic(),startSound(),startRecording()and the options keep working, and the console still says what goes wrong. - Set it before oav-p5 loads.
window.OAV_P5 = { panel: … };above the loader line wins, then?oav_panel=…on the page address, then?panel=…on the script's own URL. Values inwindow.OAV_P5are turned into text, so write'off', notfalse. On OpenProcessing the page address takes?sketch_oav_panel=…(the project's README says OpenProcessing forwards it to the sketch).
Examples
window.OAV_P5 = { panel: 'open' };
function setup() {
createCanvas(400, 300);
}
function draw() {
background(20);
fill(255);
text('panel: ' + OAVp5.options.panel, 20, 30);
}window.OAV_P5 = { panel: 'off' };
function setup() {
createCanvas(400, 300);
}
function draw() {
background(20);
fill(255);
text('panel: ' + OAVp5.options.panel + ' (no 🎹 on this page)', 20, 30);
}Related
OAVp5.panelThe 🎹 panel as an object:open(),close()andtoggle()show and hide it from code.OAVp5.panel.open()Opens the 🎹 panel (open()), closes it (close()) or flips it (toggle()).compactShows the 🎹 panel as a small box in the corner, a third of the window high, instead of a full-width bar:onoroff.dockWhich edge of the window the 🎹 button and its cards sit on,bottomortop; set it and the panel starts on that edge too.cornerWhich side of the window the 🎹 button, its cards and the compact panel sit on:rightorleft.