aframe-fps-counter-component
v1.0.1
Published
A simple FPS counter component to measure performance in VR for A-Frame.
Downloads
227
Readme
aframe-fps-counter-component
A simple FPS counter component to measure performance in VR for A-Frame.
This component copies the FPS value from the stats
component panel and
displays using simple text component. It will display different colors if frame
rate drops below certain levels.
API
| Property | Description | Default Value |
| -------- | ----------- | ------------- |
| enabled | Whether to show the counter. | true |
| for90fps | Whether the colors indicate performance level for 90fps versus 60fps. For example, if for90fps
, frame rates below 80fps will be shown as red. | true |
Installation
Browser
Install and use by directly including the browser files:
<head>
<title>My A-Frame Scene</title>
<script src="https://aframe.io/releases/0.7.1/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-fps-counter-component/dist/aframe-fps-counter-component.min.js"></script>
</head>
<body>
<a-scene>
<!-- Attach to hand. -->
<a-entity hand-controls>
<a-entity fps-counter></a-entity>
</a-entity>
</a-scene>
</body>
npm
Install via npm:
npm install aframe-fps-counter-component
Then require and use.
require('aframe');
require('aframe-fps-counter-component');