cursor

概要

p5.jsリファレンス(参考情報)

[p5.js] cursor

サンプル

# Move the mouse across the quadrants
# to see the cursor change
def draw
  background(220)
  line(width / 2, 0, width / 2, height)
  line(0, height / 2, width, height / 2)
  if mouseX < 50 && mouseY < 50
    cursor(CROSS)
  elsif mouseX > 50 && mouseY < 50
    cursor('progress')
  elsif mouseX > 50 && mouseY > 50
    cursor('https://avatars0.githubusercontent.com/u/1617169?s=16')
  else
    cursor('grab')
  end
end

構文

戻値