HTML5 Canvas 3D WebGL (TM) js Library
 

setPos Library Method

Short Description: Set eye point position

Signature: taccgl.stdEye.setPos (x,y,z)
Class: Eye Class
 

Sets the eye position to the given coordinates. Note that the viewing direction always is (0,0,1), i.e. in direction of the Z axis. The resulting image is always adjusted so that each 3D voxel at (x,y,0) is mapped to the pixel (x,y) within the body of the currently shown HTML document.

Coordinates (0,0,-5000) show the scene from top left, (1200,0,-5000) from top right, (500,2000,-5000) from a middle position and from the bottom.

Examples

taccgl.stdEye.setPos(1200,0,5000); var a=taccgl.actor("pgMiddleColumnTable",taccgl.dddBox).start();
RUN
taccgl.stdEye.setDefault (); var a=taccgl.actor("pgMiddleColumnTable",taccgl.dddBox).start();
RUN
taccgl.stdEye.setPos (500,2000,5000); var a=taccgl.actor("testimg",taccgl.dddBox).start();
RUN

WebGL™ is a trademark of the Khronos Group Inc.

Next Page:Eye.parallax - Set parallax position of eye point
Previous Page: Eye.setDefault - Set eye point to default position