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

159
Views
¿Cómo puedo aumentar la velocidad de las tres imágenes para que lleguen primero a la imagen del horno en p5.js Javascript?

¿Qué código debo usar para poder aumentar la velocidad de las tres imágenes en movimiento en la imagen del horno que he cargado que la imagen de escoria? de lo contrario, ¿qué podría hacer para que deje de aparecer la imagen de escoria hasta que las tres primeras lleguen a la imagen del horno y después de eso debe mostrar la imagen de escoria?

 var pic1; var pic2; var pic3; var pic4; var pic5; var pic6; let button; let posX=0 let posY=0 const rightwall=350; const height=450; function preload(){ pic1=loadImage("5.png") pic2=loadImage("Iron ore.jpg") pic3=loadImage("coal2.jpg") pic4=loadImage("blastfurnace.jpg") pic5=loadImage("limestone.jpg") pic6=loadImage("slag.jpg") } function setup(){ createCanvas(600,600); background("blue"); button=createButton("CLICK TO LOAD INTO FURNACE") button.position(200,330); button.mousePressed(changeBG); noLoop(); } function changeBG() { let val = random(65); background(val); loop(); playAnim=true; draw(); posX=0; posY=0; // background will be overwritten with 220 } function draw() { background(220); // text(mouseX + "," + mouseY, 20, 20); // If the 'a' key is pressed, draw the following text in the canvas if (key === 'a'){ textSize(22); text('a key was pressed!', width / 2, height / 2); } let s='BLAST FURNACE'; textSize(26); fill(0,102,153); text(s,50, 10,300, 400); img1=image(pic1, 320, 30, 170, 200) img2=image(pic2, posX, 90, 80, 80) img3=image(pic3,posX,180,50,50) img4=image(pic4,100,300,300,300) img5=image(pic5,posX,30,50,50) img6=image(pic6,posX,posY-310,200,200) if (playAnim) { posX=constrain(posX+1,0,rightwall-30) posY=constrain(posX-1,posY,height-50) } }
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!