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

Updating VR polyfill to 0.10.4 #209

Merged
merged 1 commit into from
Mar 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for creating the vendor/ dir. I like 👍

<script src="vendor/webvr-polyfill.min.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is definitely far beyond the scope of this issue/PR, and I'm not suggesting address it now, but ideally we don't include the <script> (and call it from webvr.js) unless we need it (#126). I say this more as a reminder to myself so we can remove this as a blocking <script> someday 😄

<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.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 glad you caught that; it was on my mental todo list

}

function onKeyUp(evt) {
Expand Down