feat: add responsive window resize
This commit is contained in:
parent
2c78c867d6
commit
369e802a61
@ -66,3 +66,9 @@ function animate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
animate()
|
animate()
|
||||||
|
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
camera.aspect = window.innerWidth / window.innerHeight
|
||||||
|
camera.updateProjectionMatrix()
|
||||||
|
renderer.setSize(window.innerWidth, window.innerHeight)
|
||||||
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user