xxxxxxxxxx
27
//https://p5js.org/reference/#/p5/cursor
var arr;
var i = 0;
function preload() {
jerry = loadimage("imgs/jerry.png")
}
function setup(){
createCanvas(windowWidth,windowHeight);
frameRate(10);
textSize(30);
arr = [ARROW, CROSS, HAND, MOVE, TEXT,WAIT, jerry];
}
function draw() {
text("Cursor changes icon", width/3,height/2);
i++;
cursor(arr[i]);
if(i >= arr.length){
i=0;
}
}