Selaa lähdekoodia

Fix VR Attributes

sebavan 5 vuotta sitten
vanhempi
commit
bdf21d47a1
1 muutettua tiedostoa jossa 2 lisäystä ja 6 poistoa
  1. 2 6
      src/Engines/Extensions/engine.webVR.ts

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

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