Closed tobychui closed 3 years ago
Just call renderer.resize(width, height)
whenever you want to resize it. Then the camera will be recalculated. I needed the same for my website and it works just fine: https://github.com/aligator/dev/blob/45374ff9f2b1d3ac96bbfac9bd64182cf3451a4f/src/windows/gCodeViewer.tsx#L64
I have updated the implementation of gcode viewer in SlicerA using your website source code as example. Thanks so much for the tips!
Hi there!
I was trying to integrate this gcode viewer into the SlicerA and observed an issue when I attach window resize events to the canvas.
Would it be possible for you to add an automatic logic for adjusting the aspect ratio when the DOM element resized? Thanks!