@@ -245,7 +245,7 @@ export class AScene extends AEntity {
245245 }
246246
247247 /**
248- * Call `requestPresent ` if WebVR or WebVR polyfill .
248+ * Call `requestSession ` if WebXR is supported .
249249 * Call `requestFullscreen` on desktop.
250250 * Handle events, states, fullscreen styles.
251251 *
@@ -325,10 +325,7 @@ export class AScene extends AEntity {
325325 }
326326 self . addFullScreenStyles ( ) ;
327327
328- // On mobile, the polyfill handles fullscreen.
329- // TODO: 07/16 Chromium builds break when `requestFullscreen`ing on a canvas
330- // that we are also `requestPresent`ing. Until then, don't fullscreen if headset
331- // connected.
328+ // Call `requestFullscreen` on desktop
332329 if ( ! self . isMobile && ! self . checkHeadsetConnected ( ) ) {
333330 requestFullscreen ( self . canvas ) ;
334331 }
@@ -339,7 +336,7 @@ export class AScene extends AEntity {
339336 }
340337
341338 /**
342- * Call `exitPresent ` if WebVR / WebXR or WebVR polyfill .
339+ * Call `xrSession.end ` if WebXR.
343340 * Handle events, states, fullscreen styles.
344341 *
345342 * @returns {Promise }
@@ -351,7 +348,7 @@ export class AScene extends AEntity {
351348 // Don't exit VR if not in VR.
352349 if ( ! this . is ( 'vr-mode' ) && ! this . is ( 'ar-mode' ) ) { return Promise . resolve ( 'Not in immersive mode.' ) ; }
353350
354- // Handle exiting VR if not yet already and in a headset or polyfill .
351+ // Handle exiting VR if not yet already and in a headset or mobile .
355352 if ( this . checkHeadsetConnected ( ) || this . isMobile ) {
356353 vrManager . enabled = false ;
357354 if ( this . hasWebXR ) {
@@ -469,10 +466,10 @@ export class AScene extends AEntity {
469466 isVRPresenting = this . renderer . xr . enabled && isPresenting ;
470467
471468 // Do not update renderer, if a camera or a canvas have not been injected.
472- // In VR mode, three handles canvas resize based on the dimensions returned by
473- // the getEyeParameters function of the WebVR API . These dimensions are independent of
469+ // In VR mode, three handles canvas resize based on the dimensions of the created
470+ // XRWebGLLayer or XRProjectionLayer . These dimensions are independent of
474471 // the window size, therefore should not be overwritten with the window's width and
475- // height, // except when in fullscreen mode.
472+ // height, except when in fullscreen mode.
476473 if ( ! camera || ! canvas || ( this . is ( 'vr-mode' ) && ( this . isMobile || isVRPresenting ) ) ) {
477474 return ;
478475 }
@@ -835,7 +832,7 @@ function getCanvasSize (canvasEl, embedded, maxSize, isVR) {
835832
836833/**
837834 * Return the canvas size. Will be the window size unless that size is greater than the
838- * maximum size (1920x1920 by default). The constrained size will be returned in that case,
835+ * maximum size (no maximum by default). The constrained size will be returned in that case,
839836 * maintaining aspect ratio
840837 *
841838 * @param {object } maxSize - Max size parameters (width and height).
0 commit comments