xxxxxxxxxx
21
function setup() {
createCanvas(400,400,WEBGL) // Canvas needs to be WEBGL
background(240)
noStroke()
// Execute blender.blend to set color and alpha
// You can also do (r,g,b,a)
blender.color("#002185", 150)
rect(-100,-100,200,200)
blender.color("#fcd300", 100)
rect(0,0,200,200)
blender.noBlend()
// Normal blend rectangle
let c = color("#fcd300");
c.setAlpha(110)
fill(c)
rect(-200,-200,200,200)
}