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

116
Visualizações
How to animate visibility of mesh in react three fiber?

I have a 3D model. I have the access to the mesh. What I want is to animate the visibility on button click. When I press a button the mesh should be invisible but not instantly. I want to make it in an animated way. It will be invisible in some steps. Like taking 2 sec of time to be invisible with a transition. How can I do that with react three fiber? I'm new in React-three/fiber.

Code I tried:

 useEffect(() => {
    if (props.miscOpen === true) {
      Object.keys(materials).forEach(function (prop) {
        if (prop.includes("_350")) {
          gsap.to(materials[prop],{duration:5,opacity:0})
          
        }
      });
    } else {
      
    }
  }, [props.miscOpen]);
about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

Are you setting the material's .transparent property to true?
If the material's transparent property is not set to true, the material will remain fully opaque and this value (opacity) will only affect its color. see here

about 4 years ago · Santiago Gelvez 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