Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Updating VR polyfill to 0.10.4
Browse files Browse the repository at this point in the history
Orbital controls are missing since they were dropped in 0.10.0
  • Loading branch information
delapuente committed Mar 21, 2018
1 parent c2fec40 commit 3312bb7
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 66 deletions.
4 changes: 2 additions & 2 deletions Assets/WebGLTemplates/WebVR/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ <h3>You&rsquo;ll need a <a href="https://webvr.rocks/">WebVR-enabled browser</a>
<button id="entervr" value="Enter VR"></button>
</div>

<script src="gl-matrix-min.js"></script>
<script src="webvr-polyfill.min.js"></script>
<script src="vendor/gl-matrix-min.js"></script>
<script src="vendor/webvr-polyfill.min.js"></script>
<script src="webvr.js"></script>
</body>

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

173 changes: 173 additions & 0 deletions Assets/WebGLTemplates/WebVR/vendor/webvr-polyfill.min.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 0 additions & 53 deletions Assets/WebGLTemplates/WebVR/webvr-polyfill.min.js

This file was deleted.

1 change: 0 additions & 1 deletion Assets/WebGLTemplates/WebVR/webvr-polyfill.min.js.map

This file was deleted.

6 changes: 2 additions & 4 deletions Assets/WebGLTemplates/WebVR/webvr.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
var gamepads = [];
var vrGamepads = [];
var toggleVRKeyName = '';
var vrPolyfill = new WebVRPolyfill();

if ('serviceWorker' in navigator && 'isSecureContext' in window && !window.isSecureContext) {
console.warn('The site is insecure; Service Workers will not work and the site will not be recognized as a PWA');
Expand Down Expand Up @@ -315,10 +316,7 @@

// Check to see if we are using polyfill.
function isPolyfilled(display) {
return (display.deviceId || '').indexOf('polyfill') > 0 ||
(display.displayName || '').indexOf('polyfill') > 0 ||
(display.deviceName || '').indexOf('polyfill') > 0 ||
display.hardwareUnitId;
return display.isPolyfilled;
}

function onKeyUp(evt) {
Expand Down

0 comments on commit 3312bb7

Please sign in to comment.