Atividade 11 - Aula 14
Exemplo: Código: let pdf; function setup() { createCanvas(640, 480); background(0); pdf = createPDF(); pdf.beginRecord(); } function draw() { noStroke(); fill(255); ellipse(mouseX, mouseY, 20, 20); } function mousePressed(){ if (mouseButton === LEFT) { saveCanvas('imagem'+frameCount+'.png'); } else if (mouseButton === RIGHT) { pdf.save(); } else if (mouseButton === CENTER) { pdf.nextPage(); } }