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

195
Views
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 answers
Answer question

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 Report
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!