Я создал форму, используя beginShape , endShape и curveVertex . Мой код выглядит так:
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
strokeWeight(5);
point(84, 91);
point(68, 19);
point(21, 17);
point(32, 91);
strokeWeight(1);
fill(0); // HOW TO FILL WITH IMAGE
beginShape();
curveVertex(84, 91);
curveVertex(84, 91);
curveVertex(68, 19);
curveVertex(21, 17);
curveVertex(32, 91);
curveVertex(32, 91);
endShape(CLOSE);
}
Вместо того, чтобы заполнять форму цветом, я хочу заполнить ее изображением. Это возможно с P5. js?