Skip to content

Commit

Permalink
WebVR: Improved error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Oct 31, 2017
1 parent 0b7b1f8 commit c8108f6
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions examples/js/vr/WebVR.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,22 @@ var WEBVR = {

} else {

var error = document.createElement( 'div' );
error.style.position = 'absolute';
error.style.left = 'calc(50% - 150px)';
error.style.bottom = '20px';
error.style.width = '300px';
error.style.fontFamily = 'sans-serif';
error.style.fontSize = '16px';
error.style.fontStyle = 'normal';
error.style.lineHeight = '26px';
error.style.backgroundColor = '#fff';
error.style.color = '#000';
error.style.padding = '10px';
error.style.textAlign = 'center';
error.style.zIndex = '999';
error.innerHTML = 'Your browser does not support WebVR. Check <a href="https://webvr.info">webvr.info</a> for assistance.';

return error;
var message = document.createElement( 'div' );
message.style.position = 'absolute';
message.style.left = 'calc(50% - 90px)';
message.style.bottom = '20px';
message.style.width = '180px';
message.style.fontFamily = 'sans-serif';
message.style.fontSize = '13px';
message.style.fontStyle = 'normal';
message.style.backgroundColor = '#fff';
message.style.color = '#000';
message.style.padding = '12px 6px';
message.style.textAlign = 'center';
message.style.zIndex = '999';
message.innerHTML = '<a href="https://webvr.info">WEBVR</a> NOT SUPPORTED';

return message;

}

Expand Down

0 comments on commit c8108f6

Please sign in to comment.