Three.js 006Fullscreen and Resizing
Summary
- Set canvas size to viewport size
window.innerWidth
andwindow.innerHeight
. - Added
resize
event listener to update canvas size, camera aspect ratio and projection matrix, renderer size and pixel ratio (window.devicePixelRatio
). - Added
dblclick
event listener to toggle fullscreen mode.
Loading...