<!DOCTYPEhtml>
<meta charset='UTF-8'> <!-- Viewport size change in WebGL and submit it to the VR device as a base64 image.
If this fails, something is seriously wrong. -->
<html class="reftest-wait">
<head>
<script type='text/javascript' src='webgl-util.js'></script>
<script type='text/javascript' src="VRSimulationDriver.js"></script>
<script id="vs" type="x-shader/x-vertex">
attribute vec2 aVertCoord;
var submitResult = null; var vrDisplay = null; var webglCanvas = null; var gl = null; var prog = null; varimg = null;
// The resolution is 540 : 300 (the ratio of 2160 * 1200, like Vive and Oculus)
const eyeWidth = 270;
const eyeHeight = 300;
function setStatus(text) { var elem = document.getElementById('status');
elem.innerHTML = text;
}
function initVRMock() {
VRServiceTest = navigator.requestVRServiceTest();
if (!VRServiceTest) {
setStatus('VRServiceTest get failed.');
return;
}
VRSimulationDriver.AttachWebVRDisplay().then(() => {
VRSimulationDriver.SetEyeResolution(eyeWidth, eyeHeight);
VRSimulationDriver.UpdateVRDisplay();
}).then(() => {
// Looking for VR displays
if (navigator.getVRDisplays) {
submitResult = new VRSubmitFrameResult();
navigator.getVRDisplays().then(function (displays) {
if (displays.length > 0) {
window.addEventListener('vrdisplaypresentchange', onVRPresentChange, false);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.