function onWindowResize() {
      let threeD = document.getElementById('r3d');
      camera.canvas = {
        width: threeD.clientWidth,
        height: threeD.clientHeight,
      };
      camera.fitBox(2);

      renderer.setSize(threeD.clientWidth, threeD.clientHeight);

      // update info to draw borders properly
      stackHelper.slice.canvasWidth = threeD.clientWidth;
      stackHelper.slice.canvasHeight = threeD.clientHeight;
    }
function onWindowResize() {
      let threeD = document.getElementById('r3d');
      camera.canvas = {
        width: threeD.clientWidth,
        height: threeD.clientHeight,
      };
      camera.fitBox(2);

      renderer.setSize(threeD.clientWidth, threeD.clientHeight);

      
      stackHelper.slice.canvasWidth = threeD.clientWidth;
      stackHelper.slice.canvasHeight = threeD.clientHeight;
    }
function onWindowResize ( ) { let threeD = document . getElementById ( 'r3d' ) ; camera . canvas = { width : threeD . clientWidth , height : threeD . clientHeight , } ; camera . fitBox ( 2 ) ; renderer . setSize ( threeD . clientWidth , threeD . clientHeight ) ; // update info to draw borders properly stackHelper . slice . canvasWidth = threeD . clientWidth ; stackHelper . slice . canvasHeight = threeD . clientHeight ; }
On window resize callback
On window resize callback