Socket
Book a DemoInstallSign in
Socket

threejs-gyroscope-controls

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

threejs-gyroscope-controls

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

latest
npmnpm
Version
0.5.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

threejs

FAQs

Package last updated on 09 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts