aframe-fps-look-controls-component

Move the mouse to look around, without needing to hold the button down.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
aframe-fps-look-controls-component
1.1.05 years ago5 years agoMinified + gzip package size for aframe-fps-look-controls-component in KB

Readme

aframe-fps-look-controls-component

Version License
A-Frame component to enable first-person shooter (FPS)-style mouse looking: move the mouse to look around, without needing to hold the button down.
Heavily based on prior art by @cemkod.

API

| Property | Description | Default Value | | -------- | ----------- | ------------- | | user-height | How much height to add to the camera | 1.6 |

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.6.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-fps-look-controls-component/dist/aframe-fps-look-controls-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity camera fps-look-controls></a-entity>
  </a-scene>
</body>

npm

Install via npm:
npm install aframe-fps-look-controls-component

Then require and use.
require('aframe');
require('aframe-fps-look-controls-component');