Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 616 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 616 Bytes

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 :)