open-audiovisual
Search GitHub

oav-p5 reference · Loading options

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 off everything 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 in window.OAV_P5 are turned into text, so write 'off', not false. On OpenProcessing the page address takes ?sketch_oav_panel=… (the project's README says OpenProcessing forwards it to the sketch).

Examples

jsOpenProcessing ↗
window.OAV_P5 = { panel: 'open' };

function setup() {
  createCanvas(400, 300);
}

function draw() {
  background(20);
  fill(255);
  text('panel: ' + OAVp5.options.panel, 20, 30);
}
The 🎹 panel is open as soon as the page loads: the on-screen controller and its buttons.
jsOpenProcessing ↗
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);
}
There is no 🎹 button at all. The sketch still hears a real controller and everything else.

Related

  • OAVp5.panel The 🎹 panel as an object: open(), close() and toggle() show and hide it from code.
  • OAVp5.panel.open() Opens the 🎹 panel (open()), closes it (close()) or flips it (toggle()).
  • compact Shows the 🎹 panel as a small box in the corner, a third of the window high, instead of a full-width bar: on or off.
  • dock Which edge of the window the 🎹 button and its cards sit on, bottom or top; set it and the panel starts on that edge too.
  • corner Which side of the window the 🎹 button, its cards and the compact panel sit on: right or left.

p5/oav-p5.js, line 126

↑ Back to top · All names