xxxxxxxxxx
29
let frameHeight = 0;
function setup() {
createCanvas(400, 200);
frameHeight = height;
}
function draw() {
background(220);
const x1 = 125;
const x2 = 95;
const x3 = 140;
const y1 = 120;
beginShape();
vertex( 127, 0 );
bezierVertex(127, 27, 92, 50, 92, 114);
bezierVertex(92, 174, 192, 213, 204, 213);
bezierVertex(width-192, 213, width-92, 174, width-92, 114);
bezierVertex(width-92, 50, width-127, 27, width-127, 0);
endShape(CLOSE);
}