If you're looking for information on how to get all the vertices, edges, and triangles of a scene, check out this thread. However, some details there may need updating.
One way to achieve this is by utilizing the .info property, but keep in mind:
- Using this property in the global scope will give you the total count of vertices, which can lead to issues when dealing with multiple objects in the scene.
- Also, take note that having
wireframe: true
will result in 0 vertices; ensure it's set to false
.
Additionally, as highlighted by pailhead, obtaining consistent values can be challenging due to differences between non-indexed
and indexed
geometries. In non-indexed geometries, vertices are not shared across triangles, resulting in more vertices, while indexed geometries share vertices, leading to fewer of them.
Regarding rStats
, it no longer functions as the WebGL1
standard has been deprecated since r117/153
, completely removed in r163
. If you're using older versions with WebGL1
, it may work, but with the latest versions utilizing WebGL2
, it won't.
For more details, refer to the Migration Guide.
To create a pseudo-rStat, consider using TextGeometry
:
When it comes to camera switching, you can animate the transition between views using libraries like GSAP
or TWEEN
.
You can also utilize an HTML layer for better display:
... (Code snippets provided) ...