arc(中心のx座標, 中心のy座標, 直径, 開始角度, 終了角度)
arc(中心のx座標, 中心のy座標, 横幅, 縦幅, 開始角度, 終了角度)
sketch.jsconst 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.arc(p.mouseX, p.mouseY, 80, 80, 0, p.HALF_PI, p.PIE);
}
}
new p5(sketch, 'editor');