Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
img.get() a veces devuelve una imagen y a veces una matriz en p5.js

Estoy tratando de hacer una animación de sprites en p5.

 let spritesheet; function setup() { createCanvas(innerWidth, innerHeight); spritesheet = loadImage('./spritesheet.png') background(0) } function draw() { let img = spritesheet.get(0, 0, 100, 100) console.log(img) image(img,0,0,100,100) }

Cuando y es 0

 let img = spritesheet.get(0, 0, 100, 100)

Funciona bien, pero cuando trato de ajustar los valores de z o y se rompe

 let img = spritesheet.get(0, 100, 100, 100)

Aquí está el registro de la consola.

error de la consola

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!