-
Notifications
You must be signed in to change notification settings - Fork 1
Gyroscope
Josh Stovall edited this page Dec 19, 2020
·
3 revisions
Create a gyroscope listener. See the live demo
// setup gyroscope
new XR.Gyroscope({
action: listen,
scale: [-1, 1]
});
// listen function
function listen(e){
console.log(e);
// { x: 0, y: 0, z: 0 }
}
Name | Type | Default | Description |
---|---|---|---|
action |
function | function to call on gyroscope updates | |
scale |
array | [-1, 1] |
set min/max axis values |