processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.54k stars 3.3k forks source link

cursor() - the image not displayed as the cursor #6804

Closed shawnwz closed 7 months ago

shawnwz commented 7 months ago

Most appropriate sub-area of p5.js?

p5.js version

1.9.0

Web browser and version

Google Chrome 121.0.6167.139

Operating system

Mac

Steps to reproduce this

reference to https://p5js.org/reference/#/p5/cursor

If the path to an image is passed, as in cursor('assets/target.png'), then the image will be used as the cursor

acctually the image is not used as the cursor

I tested

cursor(CROSS) is working cursor('https://avatars0.githubusercontent.com/u/1617169?s=16') is working

BUT cursor("assets/erasers/64-eraser.png") is NOT working

welcome[bot] commented 7 months ago

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!

Qianqianye commented 7 months ago

Hi @shawnwz, to help us better understand this, could you provide a p5.js web editor link that includes a code snippet illustrating the issue? Thanks!

haroon10725 commented 7 months ago

Hi @Qianqianye this is the code snippet illustrating the issue. p5.js web editor

haroon10725 commented 7 months ago

Hey @davepagurek Can I work on this?

davepagurek commented 7 months ago

Thanks @haroon10725, I'll assign it to you!