提交 c9fd6070 编写于 作者: B Brian Peiris

Fix for Firefox WebVR (again)

上级 f4782d99
......@@ -11,15 +11,11 @@ THREE.VRControls = function ( object, onError ) {
function filterInvalidDevices( devices ) {
var
OculusDeviceName = 'VR Position Device (oculus)',
CardboardDeviceName = 'VR Position Device (cardboard)';
// Exclude Cardboard position sensor if Oculus exists.
var oculusDevices = devices.filter( function ( device ) {
return device.deviceName === OculusDeviceName;
return device.deviceName.toLowerCase().indexOf('oculus') !== -1;
} );
......@@ -27,7 +23,7 @@ THREE.VRControls = function ( object, onError ) {
return devices.filter( function ( device ) {
return device.deviceName !== CardboardDeviceName;
return device.deviceName.toLowerCase().indexOf('cardboard') === -1;
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册