Intuitive camera controls for desktop 3D experiences with A-Frame.
- 🚫<--->🚫 Dynamically set maximum yaw and pitch (see options) to control sensitivity and max turn angles.
- 💻 Provides intuitive desktop view controls without requiring mousedown+drag.
- 😎📱💯 Includes the core touch and HMD view controls for drop-in replacement of core
<!-- A-Frame standard library if needed --><!-- Component (includes A-Frame core) --><!-- ... -->
$ npm install aframe-no-click-look-controls
var AFRAME = ;var NoClickLookControls = ;AFRAME;
(units are radians)
|maxyaw||3π||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.|
TODOS (PRs welcome)
allow asymmetrical yaw and pitch values rather than forcing symmetrical distances from original camera position
add option to slow down camera rotation as the mouse gets closer to the edge of the canvas