Browse Source

Fix again...

sebavan 5 years ago
parent
commit
2335aa99b2
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/Engines/Extensions/engine.webVR.ts

+ 6 - 2
src/Engines/Extensions/engine.webVR.ts

@@ -206,10 +206,14 @@ Engine.prototype.enableVR = function() {
 
         this.onVRRequestPresentStart.notifyObservers(this);
 
-        this._vrDisplay.requestPresent([{
-            source: this.getRenderingCanvas(),
+        var presentationAttributes = {
             highRefreshRate: this.vrPresentationAttributes ? this.vrPresentationAttributes.highRefreshRate : false,
             foveationLevel: this.vrPresentationAttributes ? this.vrPresentationAttributes.foveationLevel : 1,
+        };
+
+        this._vrDisplay.requestPresent([{
+            source: this.getRenderingCanvas(),
+            attributes: presentationAttributes
         }]).then(onResolved).catch(onRejected);
     }
 };