THREE.VRController icon indicating copy to clipboard operation
THREE.VRController copied to clipboard

An unhandled exception may occur when expected buttons mismatch the actually reported ones

Open Artyom17 opened this issue 6 years ago • 0 comments

Just recently hit that issue: different browsers may report different number of buttons (and theoretically - axes) for the same controllers (even though the order of those, obviously, must be correct). If the number of expected buttons is greater than the number of buttons actually reported then VRController throws an exception (in line 187). For safety reasons I am adding if check for buttons and axes.

Artyom17 avatar Jan 22 '19 21:01 Artyom17