Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Update stats.md #5378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/components/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,33 @@ source_code: src/components/scene/stats.js

[scene]: ../core/scene.md

The stats component displays a UI with performance-related metrics. The stats
component applies only to the [`<a-scene>` element][scene].
The stats component displays a UI with performance-related metrics of your Aframe Project. The stats component applies only to the [`<a-scene>`][scene] element.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure mentioning A-Frame here adds much value. Just more verbose


## Example

```html
<a-scene stats></a-scene>
```
It can also be written as `stats="true"` which will activate the UI and `stats="false"` to hide the UI. This version can be useful during development as it allows you to keep the component within your code for easy access.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be documented in a values section like this one https://aframe.io/docs/1.4.0/components/gltf-model.html#values


## Metrics

- **fps**: frames per second, framerate. Aim for stable 90 fps with the WebVR 1.0 API.
- **requestAnimationFrame** (raf): Latency.

Three.js -- **Memory**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure mentioning Three.js here adds much value.

- **Textures**: number of three.js textures in the scene. A lower count means
the scene is using less memory and sending less data to the GPU.
- **Programs**: number of GLSL shaders in the scene.
- **Geometries**: number of three.js geometries in the scene. A lower count
means the scene is using less memory.
- **Vertices**: number of vertices in the scene.
- **Faces**: number of faces in the scene.

Three.js -- **Render**
- **Points**: number of points (vertices) in the scene.
- **Triangles**: number of triangles (faces) in the scene.
- **Calls**: number of draw calls on each frame.

A-Frame
- **Load Time**: how long it took for the scene to start rendering, in ms.
- **Entities**: number of A-Frame entities.

Expand Down