[x3d-public] Gyroscope interface from Moz

Joseph D Williams joedwil at earthlink.net
Fri Aug 26 10:52:54 PDT 2022


Gyroscope
The Gyroscope interface of the Sensor APIs provides on each reading the angular velocity of the device along all three axes.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.


https://developer.mozilla.org/en-US/docs/Web/API/Gyroscope

Constructor
Gyroscope()
Creates a new Gyroscope object.
Properties
Gyroscope.x Read only
Returns a double, containing the angular velocity of the device along the device's x axis.
Gyroscope.y Read only
Returns a double, containing the angular velocity of the device along the device's y axis.
Gyroscope.z Read only
Returns a double, containing the angular velocity of the device along the device's z axis.

Note: Not quite x3d standard, but now only need simple script to find angular velocities from standard features of web3d x3d for Viewpoint and by attaching position and orientation sensors to any shape; with collision sensing available. 

Thanks x3d, 
Joe



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220826/9f14c629/attachment.html>


More information about the x3d-public mailing list