Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

320
Vistas
P5.js cursor() no images are loading when i put in file path

I grab a png image from online download it and then use cursor() and the put the file location inside the curve thing that's next to cursor, but the cursor doesn't change to the image and it does not say there's a error. How do I fix this? Here's my code not showing file location of file don't want people to know personal info.

function setup() {
  createCanvas(500, 900);
  strokeWeight(10);  
  cursor("");
}

function draw() {
  background(96, 166, 180);
  rect(250, 40, 150, 50);
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Could you please add the file path you're using to your question? (With personal information censored of course, such as using a fake name but in place of where it is in the actual path)

The problem is most likely the location of your file, assuming that its just in your Downloads folder from your post. Make sure that your image is located inside the same source folder as your JS sketch, and then call it using a relative path instead of an absolute one. (Ex: "./images/example.png")

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda