function handleResize() {
  const w = window.innerWidth
  const h = window.innerHeight
  // Try to adopt screen size, heeding maximum sizes specified
  const containerW = Math.min(w, MAX_WIDTH)
  // On small screens, use full device height
  const containerH = w <= 420 ? h : Math.min(h, MAX_HEIGHT)
  appNodes.stageContainer.style.width = containerW + "px"
  appNodes.stageContainer.style.height = containerH + "px"
  stages.forEach((stage) => stage.resize(containerW, containerH))
  // Account for scale
  stageW = containerW / scale
  stageH = containerH / scale
}
// Account for window resize and custom scale changes.
Account for window resize and custom scale changes.
Account for window resize and custom scale changes .
function handleResize() {
  const w = window.innerWidth
  const h = window.innerHeight
  const containerW = Math.min(w, MAX_WIDTH)
  const containerH = w <= 420 ? h : Math.min(h, MAX_HEIGHT)
  appNodes.stageContainer.style.width = containerW + "px"
  appNodes.stageContainer.style.height = containerH + "px"
  stages.forEach((stage) => stage.resize(containerW, containerH))
  stageW = containerW / scale
  stageH = containerH / scale
}
function handleResize ( ) { const w = window . innerWidth const h = window . innerHeight const containerW = Math . min ( w , MAX_WIDTH ) const containerH = w <= 420 ? h : Math . min ( h , MAX_HEIGHT ) appNodes . stageContainer . style . width = containerW + "px" appNodes . stageContainer . style . height = containerH + "px" stages . forEach ( ( stage ) => stage . resize ( containerW , containerH ) ) stageW = containerW / scale stageH = containerH / scale }
Account for window resize and custom scale changes.
Account for window resize and custom scale changes .
// Try to adopt screen size, heeding maximum sizes specified // On small screens, use full device height // Account for scale