stewdio / THREE.VRController

Support hand controllers for Oculus, Vive, Windows Mixed Reality, Daydream, GearVR, and more by adding VRController to your existing Three.js-based WebVR project.
https://stewdio.github.io/THREE.VRController/
MIT License
229 stars 32 forks source link

Event for original isPressed flag #25

Open Kif11 opened 5 years ago

Kif11 commented 5 years ago

I needed access to original isPressed boolean in order to fly around the scene with the mouse press. So I have to add this in order to expose it.

if ( button.isPressed && isPrimary ) {
    controller.dispatchEvent({ type: 'primary pressed' })
}

I don't quite understand why it was not exposed original. It is such a basic thing to have.

I can make an PR for that if necessary.