Coder Social home page Coder Social logo

Comments (4)

vasturiano avatar vasturiano commented on July 26, 2024 1

Thanks for reaching out @knackstedt.

Yes, it is expected that animations on the conic polygons do consume a bit of CPU capacity. The reason is that geometries need to be calculated for all the intermediate positions of the interpolator. These geometries are calculated using three-conic-polygon-geometry and there is some complexity to those objects.

I've optimized what I could in both the geometry lib and in globe.gl, and not certain there's a lot more that can be done other than use it on powerful enough GPU hardware.

from globe.gl.

knackstedt avatar knackstedt commented on July 26, 2024 1

@vasturiano I can clearly see better performance this way. The fact that you were able to implement a solution so quickly is very impressive :)
It looks very smooth and doesn't make my CPU performance hit 100% at any point during the transition.

from globe.gl.

knackstedt avatar knackstedt commented on July 26, 2024

The system that I'm using for this is very beefy. It's running a Ryzen 9 3900XT and a GeForce RTX 3090.
I feel like there shouldn't be any noticeable lag during transitions. I also notice significant lag on the geometry changes on this scene load https://globe.gl/example/countries-population/, which I suspect has the same origin cause.

A Possible remedy would be enforcing this transition to only apply to a single mesh at a time. It might be better suited as an issue with three-globe instead of globe.gl. I'm not sure I fully understand the differences between the two yet.
If possible you could use scaling to tween between the mesh geometry sizes.

from globe.gl.

vasturiano avatar vasturiano commented on July 26, 2024

@knackstedt I've done some experimenting and ended up with a solution that has better performance during transitions.
It's applied to the latest version and you can see it the example: https://globe.gl/example/countries-population/

Essentially, as you suggested, instead of re-generating geometries at every tick of the tween it's merely applying a scaling factor to the existing geometries.

Let me know if you see an improvement on your side.

from globe.gl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.