const y =
    dy < 0
      ? 0
      : dy + position.size > position.canvas.height
        ? position.canvas.height - position.size