1.0.0 • Published 4 years ago

aframe-vr-mode-watcher v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

VR Mode Watcher

This component adds a state to an entity signaling whether or not VR mode is active.

API

PropertyDescriptionDefault Value
vrStateNameThe name of the state which will be added when VR mode is active.vr
nonVrStateNameThe name of the state which will be added when VR mode is not active.non-vr

Installation

Browser Installation

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/1.0.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-vr-mode-watcher@1.0.0/dist/aframe-vr-mode-watcher.min.js"></script>
</head>

<body>
  <a-scene>
    
    <a-entity
      vr-mode-watcher
      geometry="primitive: box">
    </a-entity>
    
  </a-scene>
</body>

NPM Installation

Install via NPM:

npm install aframe-vr-mode-watcher

Then register and use.

require('aframe');
require('aframe-vr-mode-watcher');