'Babylonjs -- How to get Inspector information programatically?

When I view a scene in Babylon, the Inspector has an option to view Statistics Pane > Count. This information contains items such as Total meshes, Active meshes, Active indices, ... , Total materials, Total textures.

I would like to get this information using the Babylonjs library but unable to figure out using the documentation. Could you please advise which part of the Babylonjs API supports the functionality to get the above data programatically?



Solution 1:[1]

Link to source code

Here you can see how it's all implemented, for instance how to count all meshes:

<TextLineComponent label="Total meshes" value={scene.meshes.length.toString()} />

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Oscar