2. with (e.g. one's eyes closed, the light on); while (e.g. standing, alive); as
after a past-tense verb describing a state
それからしばらく三人は黙ったままだった。After that, the three of them remained silent for a while.
3. as (one pleases, one is told, etc.); according to
as 〜に
足の向くまま、町を歩いた。I wandered around town wherever my feet took me.