ene.startFrame();
        scene.updateInputSources(frame, xrRefSpace);

        session.requestAnimationFrame(onXRFrame);

        let pose = frame.getViewerPose(xrRefSpace);

        if (pose) {
          if (useLayer) {
            let views = [];
            for (let view of pose.views) {
                view.requestViewportScale(scale);
                let subImage = xrGLFactory.getViewSubImage(proj_layer, view);
                subImage.framebuffer = xrFramebuffer;
                let viewport = subIma