Skip to content

Commit

Permalink
Updating /build
Browse files Browse the repository at this point in the history
  • Loading branch information
toji committed Dec 23, 2019
1 parent 759bfd3 commit 0a5ca45
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
24 changes: 7 additions & 17 deletions build/webxr-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,13 @@ class XRWebGLLayer {
getViewport(view) {
return view._getViewport(this);
}
static getNativeFramebufferScaleFactor(session) {
if (!session) {
throw new TypeError('getNativeFramebufferScaleFactor must be passed a session.')
}
if (session[PRIVATE$15].ended) { return 0.0; }
return 1.0;
}
}

const PRIVATE$12 = Symbol('@@webxr-polyfill/XRInputSourceEvent');
Expand Down Expand Up @@ -6102,23 +6109,6 @@ class WebXRPolyfill {
return originalSupportsSession.call(this, mode);
};
}
if (global.XRWebGLLayer) {
let originalRequestSession = global.navigator.xr.requestSession;
global.navigator.xr.requestSession = function(mode, options) {
return originalRequestSession.call(this, mode, options).then((session) => {
session._session_mode = mode;
return session;
});
};
var originalXRLayer = global.XRWebGLLayer;
global.XRWebGLLayer = function(session, gl, options) {
if (!options) {
options = {};
}
options.compositionDisabled = (session._session_mode === "inline");
return new originalXRLayer(session, gl, options);
};
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion build/webxr-polyfill.min.js

Large diffs are not rendered by default.

24 changes: 7 additions & 17 deletions build/webxr-polyfill.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,13 @@ class XRWebGLLayer {
getViewport(view) {
return view._getViewport(this);
}
static getNativeFramebufferScaleFactor(session) {
if (!session) {
throw new TypeError('getNativeFramebufferScaleFactor must be passed a session.')
}
if (session[PRIVATE$15].ended) { return 0.0; }
return 1.0;
}
}

const PRIVATE$12 = Symbol('@@webxr-polyfill/XRInputSourceEvent');
Expand Down Expand Up @@ -6096,23 +6103,6 @@ class WebXRPolyfill {
return originalSupportsSession.call(this, mode);
};
}
if (global.XRWebGLLayer) {
let originalRequestSession = global.navigator.xr.requestSession;
global.navigator.xr.requestSession = function(mode, options) {
return originalRequestSession.call(this, mode, options).then((session) => {
session._session_mode = mode;
return session;
});
};
var originalXRLayer = global.XRWebGLLayer;
global.XRWebGLLayer = function(session, gl, options) {
if (!options) {
options = {};
}
options.compositionDisabled = (session._session_mode === "inline");
return new originalXRLayer(session, gl, options);
};
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webxr-polyfill",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/immersive-web/webxr-polyfill",
"main": "build/webxr-polyfill.js",
"module": "build/webxr-polyfill.module.js",
Expand Down

0 comments on commit 0a5ca45

Please sign in to comment.