olmozavala / particleviz

Software to generate visualizations of large number of particles from Lagrangian output.
MIT License
10 stars 6 forks source link

Pilot implementation of ThreeJS #26

Open anand-kamble opened 10 months ago

anand-kamble commented 10 months ago

[!IMPORTANT] Intended for testing; Do not merge.

I created a function initThreeJS and passed the scope of the react component to it. Added some extra methods in the class of react component, and then called it simply by this.RenderPoint(clon, clat);.

Also, the rendering is inefficient at the moment since I've not yet implemented the clearThreeJSPoints function. I guess I would have to create an async function for that since I tried calling it directly and it caused some problems with the points array.

I know this is not the best way to do this, but I just wanted to get an idea so I went with the quick way.


I will keep pushing any changes to this branch in this week.

I have switched the geometry in ThreeJS to use Buffer of float32, which has improved the rendering speeds and the webpage is very smooth now. I have committed those changes here : https://github.com/olmozavala/particleviz/pull/26/commits/499ab0703682ed1ff344125a0894a40f02d6a283

philippemiron commented 10 months ago

I'm sorry but what is the end goal of this PR?

olmozavala commented 10 months ago

Hello @philippemiron . We are thinking of adding a 3D version. But this was just a proof of concept. Now, we want to add a 'globe' button on the interface so that the user can make the change. The second step (much more complicated) is to make the full pipeline of rendering 3D particles.