xxxxxxxxxx
// ---------------------------------------------
// ---------------------------------------------
// GLOBAL VARIABLES
var globalVariable; // will be used by every function
// ---------------------------------------------
// ---------------------------------------------
// PRELOAD
function preload(){
}
// ---------------------------------------------
// ---------------------------------------------
// MAIN FUNCTIONS
function setup(){
createCanvas(400, 400);
}
function draw(){
background(220);
}
// ---------------------------------------------
// ---------------------------------------------
// EVENT FUNCTIONS
function keyPressed(){
}
function mousePressed(){
}
// ---------------------------------------------
// ---------------------------------------------
// CUSTOM FUNCTIONS
function customFunction(){
}
// ---------------------------------------------
// ---------------------------------------------
// CLASS
class exampleClass {
// VARIABLES
constructor(){
}
// FUNCTIONS
function1(){
}
function2(){
}
}
// ---------------------------------------------
// ---------------------------------------------