OAVp5.chop.state#
variableoav-p5OAVp5.chop.state
Where the @openav/chop module is: 'off', 'loading', 'on' or 'error'.
off until one of these functions is first called, loading while @openav/chop arrives (a few frames), on once it is in, error if it could not be loaded: a card says so and every function then passes its input through. trigger() on its own never loads it, because it only records that something happened.
- Type
String- Range
'off' | 'loading' | 'on' | 'error'
Changes the first time a CHOP function is called and once more when the module has arrived. off before any call.
Examples
function setup() {
createCanvas(400, 300);
}
function draw() {
background(20);
fill(255);
text('chop: ' + OAVp5.chop.state, 20, 30); // off, then loading, then on
if (frameCount > 30) circle(lag(mouseX, 0.3), height / 2, 30); // the first lag() loads the module
}Related
OAVp5.chop.moduleThe @openav/chop module itself once it has loaded, otherwisenull: the classes and functions the CHOP functions are built on.OAVp5.chopThe CHOP functions under one roof, plus the state of the module behind them:OAVp5.chop.lag(…),.state,.slots(),.reset().lag()Followsvaluesmoothly instead of jumping: up inupseconds, down indownseconds (TouchDesigner's Lag CHOP).