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

168
Visualizações
if something == something show something and keep showing it

so when this is true i want to keep the images even when this turns false later

if (pose && label=="HowMuchCanYouSee"==true){
    
    let eyeR = pose.rightEye;
    let eyeL = pose.leftEye;
    let d = dist(eyeR.x, eyeR.y,eyeL.x, eyeL.y);
    
    
    //sharingan complete
    image(img1,pose.leftEye.x-d/2,pose.leftEye.y-d/2, d,d);
    image(img1,pose.rightEye.x-d/2,pose.rightEye.y-d/2, d,d);
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I don't understand why the condition looks like this label=="HowMuchCanYouSee"==true and not just this label=="HowMuchCanYouSee"

Anyway you may add a new flag to the story starting with false that will be turned to true the first time your code it's hit, and after then, the condition will always pass because there's flag===true put in OR:

var flag = false;
if( flag === true || (pose && label=="HowMuchCanYouSee") ){
    flag = true;
    //the rest of your code
}

Attention: the flag var is declared global. That's not a good practice but it shows the concept.

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