JSPM

threejs-gyroscope-controls

0.5.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q16679F
  • License ISC

Three.js Gyroscope Controls for those who want to use three.js in AR/VR/XR projects

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (threejs-gyroscope-controls) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    How to use

    import { GyroscopeControls } from 'threejs-gyroscope-controls';
    
    const orbitControls = new GyroscopeControls(camera, renderer.domElement);

    If you want to have ios support, call this code before initializing GyroscopeControls (it must be called by click event)

    import { requestPermission } from 'threejs-gyroscope-controls';
    
    window.addEventListener('click', () => {
        requestPermission().catch(() => console.error('Permission denied'))
    })

    Good luck :)