Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

317
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda