I'm making a 3D camera/map system 100% DOM/CSS/JavaScript, no Canvas needed. The plan is to work out x,y,z coordinates and the way the camera views the map, but I just can't get my head around it.
Here's how it works.
I have a player. The player has an x, y and z coordinate. He also has a viewing distance setting that allows him to see less or more depending on system performance. With this information I then set his camera on the map. The camera is basically the screen that he is looking though. Like in any other game.
The camera has to be able to change pitch and rotate around.
To create a 3D effect I have a few options:
Either use WebGL (uses canvas)
use http://wxs.ca/js3d/ (sort of the direction I'm going in but only uses flat surfaces)
or make an object generator that can turn triangles into 3d objects. How this is done I'll explain with a picture:

I then use a map and camera system.

My problem is I can't for the life of me work out how I'm supposed to work out the perspective, camera rotation and a lot of other things. If anyone would happen to know how to do this or have a link that can explain things I'd really appreciate it.