Update VRController.js to handle WMR controller's disconnected event correctly.#24
Update VRController.js to handle WMR controller's disconnected event correctly.#24lehoangphu wants to merge 1 commit intopuckey:masterfrom
Conversation
|
Hi @lehoangphu. Can you provide some more detail? This is specifically for Windows Mixed Reality controllers? And that means it’s also specific to Microsoft Edge? |
|
Yes, this is specific to Edge and Windows Mixed Reality. This is very easy to repro, all you need is to turn off the controller and turn it back on while in exclusive view (VR) and it will hit some exception and could not complete the RAF call. The detail flow goes like this: |
|
Hi Stewart, is this (stew@rtsmith.io) a good email to reach you at? |
|
It looks like the code for VRController is in third_party but I don't see you contributing this patch upstream: https://github.com/stewdio/THREE.VRController I believe the correct thing to do is to contribute this patch there, and then do another patch in dance-tonight to pick up the latest drop. Otherwise you're just fixing one experience rather than all of the experiences that depend on VRController. Bonus points would be to contribute npm support to VRController so dance-tonight could use an npm dependency instead of copying code into third_party. |
THREE.VRController.update needs to be awared when a controller is disconnected, else it will operate on a stale this.controllers[index] and never update it with the new gamepad object.