3 ms·
Thanks for the feedback. Sorry about that, but it inherits from the fact that none of Three.js' demos resize. This is because doing it is a lot more fun than it
by DanielRibeiro 15y ago
Thanks for the feedback. Sorry about that, but it inherits from the fact that none of Three.js' demos resize. This is because doing it is a lot more fun than it looks: not the entire DOM canvas has to be changed, but all the rendering engine behind has to be recreated (camera, scene and so on). I'll see if I can make it work.
- Arcanis 15y agoIIRC, you can change a Renderer size using renderer.setSize(w, h). In order to update the camera aspect, you just have to use : camera.ratio = w / h; camera.updateProjectionMatrix().