File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -678,12 +678,15 @@ export function createXRStore<T extends XRElementImplementations>(options?: XRSt
678
678
if ( session == null || xrManager == null ) {
679
679
return
680
680
}
681
+ const xrCamera = xrManager . getCamera ( )
682
+ //update camera aspect ratio
683
+ xrCamera . aspect = xrCamera . projectionMatrix . elements [ 0 ] / xrCamera . projectionMatrix . elements [ 5 ]
684
+
681
685
const currentLayers = session ?. renderState . layers
682
686
if ( currentLayers == null ) {
683
687
return
684
688
}
685
689
//layer sorting
686
- const xrCamera = xrManager . getCamera ( )
687
690
xrCamera . getWorldPosition ( cameraWorldPosition )
688
691
; ( layerEntries as Array < XRLayerEntry > ) . sort ( ( entryA , entryB ) => {
689
692
const renderOrderDifference = entryA . renderOrder - entryB . renderOrder
You can’t perform that action at this time.
0 commit comments