generated at
p5.js:quad()

sketch.js
const sketch = p => { p.setup = () => { //キャンバスを作成 const canvas = p.createCanvas(600,425); canvas.id = '__P5sc__'; //背景色 p.background('#eee'); p.stroke('#aaa'); } p.draw = () => { if (p.mouseIsPressed) { p.fill(0,0,0,10); } else { p.fill('#fff'); } p.quad(p.mouseX, p.mouseY, p.mouseX+10, p.mouseY+80,p.mouseX+70, p.mouseY+80,p.mouseX+100, p.mouseY+30,); } } new p5(sketch, 'editor');

p5-sketch-button(実行ボタン)