When I change the tab or I'm no focusing on the tab where canvas or my sketch exists, the drawing stops, I want it to continue drawing even if I'm not focusing on the page or tab where my canvas is. Like this example of code below, when I change to tab it stops drawing until I focus again on the tab. P.S: Just the canvas to continue drawing even if I'm not focusing on the page
var y = 0
function setup() {
createCanvas(640, 480)
}
function draw() {
background(255)
fill(255, 0, 0)
rect(0, y++, 64, 64)
text(y,70,y+32)
if (y > 480)
y = 0
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.js"></script>