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

Conversation

ThaisAlvarenga
Copy link

Description:
Added another way to write stats (stats="true") and reorganized the Metrics. I hope this is helpful.

Changes proposed:

  • Included how to use stats='true'
  • Reorganized Metrics so that the items are classified under a subheading according to how they appear in the actual UI display.

Added another way to write stats (stats="true") and reorganized the Metrics.
@@ -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


## 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.


## 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

@dmarcos
Copy link
Member

dmarcos commented Nov 6, 2023

Thanks. I left some comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants