erichlof / THREE.js-PathTracing-Renderer

Real-time PathTracing with global illumination and progressive rendering, all on top of the Three.js WebGL framework. Click here for Live Demo: https://erichlof.github.io/THREE.js-PathTracing-Renderer/Geometry_Showcase.html
Creative Commons Zero v1.0 Universal
1.94k stars 177 forks source link

Some advise about WindowResize #46

Closed RenderTool closed 4 years ago

RenderTool commented 4 years ago

Hello!thank you very much. Now, I will give you some suggestions about screen adaptation on mobile app. Wechat on the iPhone doesn't seem to support canvas very well. If you use window.innerheight and window.innerwidth control canvas size, the canvas height collapses when you rotate the phone screen. I changed to :
SCREEN_WIDTH = document.body.clientWidth; SCREEN_HEIGHT = document.body.clientHeight; will back to normal. image image

Threejs also has this problem.

erichlof commented 4 years ago

@q750831855 Hello again! Thank you for the suggestion! I have taken your advice: commit

I also put in a credit to you in the updated source file. :-)

Thanks again, -Erich