open-audiovisual
Search GitHub

oav-p5 reference · Loading options

corner#

optionoav-p5
?oav_corner=right | left

Which side of the window the 🎹 button, its cards and the compact panel sit on: right or left.

Moves the 🎹 to the left or right edge, with the cards that appear beside it. scope() draws on the opposite side, so the two never meet. On openprocessing.org the default is left, because OpenProcessing's own icon sits at the top right.

Type
String
Values
right | left
default
right (left on OpenProcessing)

Anything except left means right.

Notes

  • Set it before oav-p5 loads. window.OAV_P5 = { corner: … }; above the loader line wins, then ?oav_corner=… on the page address, then ?corner=… 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_corner=… (the project's README says OpenProcessing forwards it to the sketch).

Examples

jsOpenProcessing ↗
window.OAV_P5 = { corner: 'left' };

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

function draw() {
  background(20);
  fill(255);
  text('corner: ' + OAVp5.options.corner + ' (look for the 🎹)', 20, 30);
}
The 🎹 button sits in the bottom-left corner of the window instead of the bottom-right.

Related

  • 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.
  • panel Whether the 🎹 panel starts shut, open, or does not exist: closed, open or off.
  • 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.
  • scope() Shows value in a small oscilloscope in the corner of the page and gives it back, so you can wrap any expression to watch it.

p5/oav-p5.js, line 141

↑ Back to top · All names