webvr-polyfill
Advanced tools
Comparing version 0.9.20 to 0.9.21
{ | ||
"name": "webvr-polyfill", | ||
"version": "0.9.20", | ||
"version": "0.9.21", | ||
"homepage": "https://github.com/borismus/webvr-polyfill", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -333,13 +333,23 @@ /* | ||
if (changeHandler) { | ||
element.addEventListener('fullscreenchange', changeHandler, false); | ||
element.addEventListener('webkitfullscreenchange', changeHandler, false); | ||
document.addEventListener('mozfullscreenchange', changeHandler, false); | ||
element.addEventListener('msfullscreenchange', changeHandler, false); | ||
if (document.fullscreenEnabled) { | ||
element.addEventListener('fullscreenchange', changeHandler, false); | ||
} else if (document.webkitFullscreenEnabled) { | ||
element.addEventListener('webkitfullscreenchange', changeHandler, false); | ||
} else if (document.mozFullScreenEnabled) { | ||
document.addEventListener('mozfullscreenchange', changeHandler, false); | ||
} else if (document.msFullscreenEnabled) { | ||
element.addEventListener('msfullscreenchange', changeHandler, false); | ||
} | ||
} | ||
if (errorHandler) { | ||
element.addEventListener('fullscreenerror', errorHandler, false); | ||
element.addEventListener('webkitfullscreenerror', errorHandler, false); | ||
document.addEventListener('mozfullscreenerror', errorHandler, false); | ||
element.addEventListener('msfullscreenerror', errorHandler, false); | ||
if (document.fullscreenEnabled) { | ||
element.addEventListener('fullscreenerror', errorHandler, false); | ||
} else if (document.webkitFullscreenEnabled) { | ||
element.addEventListener('webkitfullscreenerror', errorHandler, false); | ||
} else if (document.mozFullScreenEnabled) { | ||
document.addEventListener('mozfullscreenerror', errorHandler, false); | ||
} else if (document.msFullscreenEnabled) { | ||
element.addEventListener('msfullscreenerror', errorHandler, false); | ||
} | ||
} | ||
@@ -346,0 +356,0 @@ }; |
@@ -75,2 +75,3 @@ /* | ||
this.previousQ.copy(currentQ); | ||
this.previousTimestampS = timestampS; | ||
@@ -77,0 +78,0 @@ return this.outQ; |
@@ -98,2 +98,14 @@ /* | ||
window.VRDisplay = VRDisplay; | ||
// Provide navigator.vrEnabled. | ||
var self = this; | ||
Object.defineProperty(navigator, 'vrEnabled', { | ||
get: function () { | ||
return self.isCardboardCompatible() && | ||
(document.fullscreenEnabled || | ||
document.mozFullScreenEnabled || | ||
document.webkitFullscreenEnabled || | ||
false); | ||
} | ||
}); | ||
}; | ||
@@ -100,0 +112,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
781074
12897