The door slammed to.
The door was slapped to.
Suddenly the trapdoor fell to with a boom.
First of all, let me tell you the sentences are from a grammar book. (no context) Might I trouble you to tell me whether adverb 'to' is essential in those ones? They seem to indicate direction. But, actually, I can't fully understand what directions they indicate.
Please let me assume that a door was situated between 'me' and 'a girl'. The door slammed shut in the wind. Subsequently, a third person showed up, saying "the door slammed to".
In this case, would you tell me which direction 'to' indicates? Me or a girl?