Skip to content

A drop-in replacement for the core Mozilla A-Frame look-controls component

License

Notifications You must be signed in to change notification settings

jremen/no-click-look-controls

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A-Frame no-click-look-controls Component

##Overview Intuitive look controls for desktop 3D experiences.

##Demo: https://alexrkass.github.io/no-click-example/

##Features

  • 🚫⬅️➡️🚫Includes rotation angle options for dynamically focusing the user on parts of a scene.
  • 💻 Provides intuitive desktop view controls without requiring mousedown+drag.
  • 💯😎📱 Includes the core touch and HMD view controls for drop-in replacement of standard look-controls component.

##Options

Property Default Description
maxyaw Controls the max y-axis rotation. Actual max viewing angle is twice the parameter, ie 3π is 3π to the right and 3π to the left.
maxpitch π/2 Controls the max x-axis rotation. Actual max viewing angle is twice the parameter, ie π/2 is π/2 up and π/2 down.
enabled true Enables controls

##Usage ####Script

<html>
  <head>
    <!-- A-Frame Library -->
    <script src="https://aframe.io/releases/latest/aframe.js"></script>

    <!-- Component -->
    <script src="no-click-look-controls.js"></script>
  </head>
  <body>
    <a-scene>
      <!-- ... -->
      <a-entity camera no-click-look-controls></a-entity>
    </a-scene>
  </body>
</html>

####NPM

Install NPM module.

$ npm install no-click-look-controls

Register aframe-no-click-look-controls component.

var AFRAME = require('aframe-core');
var NoClickLookControls = require('aframe-no-click-look-controls');
AFRAME.registerComponent('no-click-look-controls', NoClickLookControls);

Add markup.

<a-entity camera no-click-look-controls></a-entity>

About

A drop-in replacement for the core Mozilla A-Frame look-controls component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%