Drei's "Html" component is not performant for large numbers #3130
Replies: 1 comment
-
|
Posting my experience about this, in case it's useful for people. My data is grouped in a way where I can do some shallow spatial partitioning with AABBs. I also commented out the matrix updates, since most of my data is static they are redundant. There is another issue though where the load time of the 3000 HTML element is really slow. This approach has worked well for my needs. I did try using the billboard component, but it's seemed even more expensive than the HTML component. I think a shader driven billboard which wraps the Drei text component might better for performance. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In my r3f scene, I have a lot of text (sometimes more than 2500). Initially, I rendered them using Drei's Text component but the performance was really bad.
After that, I switched over to using Drei's Html component as div +
tags to show my text labels. For small number's the Html component works fine but for large numbers of Html component's the performance is not good at all.
Is there a way to optimize the performance of 2000+ Html components in an r3f scene ? Make them display: "none" at run-time also does not help. Or should I work with CSS3DRenderer directly ?
Beta Was this translation helpful? Give feedback.
All reactions