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

143
Visualizações
Is there a way to have p5js run the same script multiple times but to read different input parameters each time? Is it possible to convert to an exe?

I was wondering if it is possible to convert a complex p5js project to an executable that would allow me to run it many thousands of times but with different input parameters? Alternatively, is it possible to loop and reset the same script many times and only update the input parameters?

A very simple example is given below

function setup() {
 
  i = 1;
  c = createCanvas(400, 400);

  colorMode(HSB, 1);

  C_array = [];
  for (i = 0; i < 10; i++) C_array[i] = 1 / i;

}

function draw() {
  background(C_array[i], 1, 1);

  saveCanvas();
  i++;
  c.reset;
}

UPDATED

I am attempting a different way now and trying to have the page reload after each sketch finishes just after saving the image. The problem is it either saves a load of exactly the same image or it reloads too quickly before the image can be saved.

function setup() {
   
  i = 0;
  c = createCanvas(400, 400);

  colorMode(HSB, 1);

a=random();
}

function draw() {
  background(a, 1, 1);

  i++;
    
  if(i>120){
  saveCanvas();
    location.reload
  }
}

Many thanks in advance!

about 4 years ago · Juan Pablo Isaza
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