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 inwindow.OAV_P5are turned into text, so write'off', notfalse. On OpenProcessing the page address takes?sketch_oav_compact=…(the project's README says OpenProcessing forwards it to the sketch).
Examples
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
}Related
panelWhether the 🎹 panel starts shut, open, or does not exist:closed,openoroff.strudelWhether oav-p5 treats the page as Strudel, the live-coding editor, and behaves politely beside it:auto,onoroff.cornerWhich side of the window the 🎹 button, its cards and the compact panel sit on:rightorleft.dockWhich edge of the window the 🎹 button and its cards sit on,bottomortop; set it and the panel starts on that edge too.