setting

v0.1.6
background(r, g, b, a);

Clear a background with a color

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte

See background in setting.h
fill(r, g, b, [a]);

Set the fill color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
[a]The alpha byte

Can also accept a hexadecimal or color name as string

fill(255, 150, 40);
square(200, 200, 64);
See fill in setting.h
strokeWeight(weight);

No description

Arguments

weightThe line width in pixels

trokeWeight(8);
ine(200, 200, mouseX, mouseY);
See strokeWeight in setting.h
noFill();

Disable fill

See noFill in setting.h
stroke(r, g, b, a);

Set the stroke color for shapes

Arguments

rThe red byte
gThe green byte
bThe blue byte
aThe alpha byte

Only implemented for line and circle

See stroke in setting.h
noStroke();

Disable stroke
Only implemented for line and circle

See noStroke in setting.h
push();

Save the style settings

See push in setting.h
pop();

Restore the style settings

See pop in setting.h
debugMode([enable]);

Toggle a helpful mode with 3D Graphics

Arguments

[enable]Whether or not to enable the debug mode, if not provided, it defaults to true

function setup()
  createWindow(800, 800, GL3D);

  debugMode();
end

function draw()
  background(51);
  
  box(100);
end
function setup()
  createWindow(800, 800, GL3D);
end

function draw()
  background(51);
  
  -- When the d key is down, show debug graphics
  if (keyIsDown('d')) then
    debugMode(true);
  else
    debugMode(false);
  end

  box(100);
end
See debugMode in setting.h