Skip to content

A-frame component which adds a state to an entity signaling whether or not VR mode is active.

License

Notifications You must be signed in to change notification settings

Eolu/aframe-vr-mode-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VR Mode Watcher

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

API

Property Description Default Value
vrStateName The name of the state which will be added when VR mode is active. vr
nonVrStateName The 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');

About

A-frame component which adds a state to an entity signaling whether or not VR mode is active.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published