Open anand-kamble opened 10 months ago
I'm sorry but what is the end goal of this PR?
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.
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 bythis.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 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