I want my page to be fully 3D space, I don't know much about 3d, but my idea is to have the body as my port view, and the world is the div where my converted content is located. I need a function that takes an orientation and a position vector (or a camera object?) As a parameter and internally with CSS transformations, it transforms the world of the div, so the screen refers to the desired part of the page. Sample page, simple room.
<body>
<div id="world">
<section id="left-wall">...</section>
<section id="right-wall">...</section>
<section id="front-wall">...</section>
<section id="floor">...</section>
</div>
</body>
script.
var cam = Camera(),
world = document.getElementById("world");
cam.setPosition([x,y,z]);
cam.setOrientation([x,y,z]);
transform(world,cam);
How could a function be transform()? I am not sure if this is the right approach or if I will do it differently.
source
share