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

198
Visualizações
cesium I have 10,000 entities, how can I do not try a loop approach to change their material?

From

new Cesium.PolylineGlowMaterialProperty({
            glowPower: 0.15,
            color: Cesium.Color.fromCssColorString("rgba(42,92,170, 0.15)")
        });

To

new Cesium.PolylineGlowMaterialProperty({
            glowPower: 0.3,
            color: Cesium.Color.fromCssColorString("rgba(255,255,255, 0.15)")
        });

Is there a way to change all the materials as a whole?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I think you'll need to loop through all the entities, but you probably don't want to allocate a new PolylingGlowMaterial for each one, as that could be slow. Instead, try changing the value on the existing material. Assuming this is a "constant" (non-time-varying) property as shown above, there's a setValue available. It goes something like this:

entity.polyline.material.glowPower.setValue(0.3);
entity.polyline.material.color.setValue(Cesium.Color.WHITE.withAlpha(0.15));

I've also shown a different way to get the same color here, without asking Cesium to parse 10000 color strings. If all 10000 entities are the same color, you should allocate this color before the loop starts, and just hand out thousands of references to it, rather than redoing it in the loop.

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