Vr on screen cursor based controller

I am working on a cesium project and is it possible for me to create and use a vr controller which is an on screen cursor for mimicking mouse clicks

I’d like to use a smartphone’s gryos, compass, and accelerometer on a desktop computer, and have it show up as a controller on gamepad API. Sort of like this (FF to 1:09)

www.youtube.com/watch?v=Jtwun8-WGBE&t=69

This would make development for these controls alot easier, as opposed to transferring it to a website (or local to your phone) after making a few changes to the code on the desktop. Perhaps there’s a device out there that does exactly this, instead of using a smartphone (which could do many other things, sort of a waste just using it for its sensors.)

Related artcle: https://developer.mozilla.org/en-US/docs/Web/API/WebVR_API/Using_VR_controllers_with_WebVR