News for hackers. Stuff that matters.
Re:In-browser retro-futuristic tank game, open source by mysterydip on Sunday August 07, 2022 @04:45PM (#32379718)
Neat! Smooth performance on my iPhone. The controls might need some tweaking in terms of values, like faster turning if I'm holding it down, but less if I'm tapping trying to line up a shot.
Re:In-browser retro-futuristic tank game, open source by brianrisk on Sunday August 07, 2022 @05:25PM (#32380068)
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
Re:In-browser retro-futuristic tank game, open source by jaeh on Monday August 08, 2022 @03:29AM (#32383134)
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)