Tengo el código de la biblioteca p5.js, la representación se realiza en function setup() . ¿Cómo puedo especificar que este código no se represente en el lienzo que crea p5, sino en mi bloque div?
<body> <div class"box"></div> </body> let ball = { x: 100, y: 100, xspeed: 1, yspeed: 1 } function setup() { createCanvas(1000, 400); } function draw() { background(0); display() move() bounce() } function display() { fill(random(255, 255), 0, 0); ellipse(ball.x, ball.y, 30, 30); } function move() { ball.x = ball.x + ball.xspeed ball.y = ball.y + ball.yspeed } function bounce() { if (ball.x > width || ball.x < 0) { ball.xspeed = ball.xspeed * -1 } if (ball.y > height || ball.y < 0) { ball.yspeed = ball.yspeed * -1 } }