open-audiovisual
Search GitHub

oav-p5 reference · Loading options

compact#

optionoav-p5
?oav_compact=on | off

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.

Normally the panel opened by 🎹 is a bar across the whole window, up to half its height. With compact it is a box at most 560 pixels wide and a third of the window high, in the corner the 🎹 sits in, so the page beside it stays in view. It is the default on strudel.cc, where the code editor needs the room.

Type
String
Values
on | off
default
off (on in Strudel)

Only on turns it on. OAVp5.options.compact reads back as true or false.

Notes

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

Examples

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

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

function draw() {
  background(20);
  fill(255);
  text('compact: ' + OAVp5.options.compact, 20, 30);   // true
}
The panel opens at once as a box in the bottom-right corner instead of a bar across the whole window.

Related

  • panel Whether the 🎹 panel starts shut, open, or does not exist: closed, open or off.
  • strudel Whether oav-p5 treats the page as Strudel, the live-coding editor, and behaves politely beside it: auto, on or off.
  • corner Which side of the window the 🎹 button, its cards and the compact panel sit on: right or left.
  • 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.

p5/oav-p5.js, line 152

↑ Back to top · All names