Hacker News new | ask | show | jobs
by brianrisk 1416 days ago
Glad it worked for you on the iPhone! I'd love to figure out how to resize the screen correctly if the phone is in portrait and then you rotate it to landscape
1 comments

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)