Hacker News new | ask | show | jobs
by jaeh 1410 days ago
do you mean like this?

  const onResize = () => {
    const { innerWidth: w, innerHeight: h } = window
    camera.aspect = w / h
    camera.updateProjectionMatrix()
    renderer.setSize(w, h)
  }
  window.addEventListener('resize', onResize)