1.0.1 • Published 7 years ago

aframe-fps-counter-component v1.0.1

Weekly downloads
57
License
MIT
Repository
github
Last release
7 years ago

aframe-fps-counter-component

Version License

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

PropertyDescriptionDefault Value
enabledWhether to show the counter.true
for90fpsWhether 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');