please.CameraNode ()
Constructor function that creates a camera object to be put in the scene graph. Camera nodes support both orthographic and perspective projection, and almost all of their properties are animatable. The view matrix can be generated in one of two ways described below.
To make a camera active, call it’s “activate()” method. If no camera was explicitly activated, then the scene graph will call the first one added that is an immediate child, and if no such camera still exists, then it will pick the first one it can find durring state sorting.
The default way in which the view matrix is calculated uses the mat4.lookAt method from the glMatrix library. The following properties provide the arguments for the library call. Note that the location argument is missing - this is because the CameraNode’s scene graph coordinates are used instead.
If the look_at property is set to null, the node’s world matrix as generated be the scene graph will be used as the view matrix instead.
One can change between orthographic and perspective projection by calling one of the following methods:
The following property influences how the projection matrix is generated when the camera is in perspective mode (default behavior).
The following properties influence how the projection matrix is generated when the camera is in orthographic mode. When any of these are set to ‘null’ (default behavior), the bottom left corner is (0, 0), and the top right is (canvas_width, canvas_height).
The following properties influence how the projection matrix is generated, and are common to both orthographic and perspective mode:
please.StereoCamera ()
A StereoCamera is a special kind of CameraNode that can be used for stereoscopic rendering. It creates two virtual cameras that are offset slightly to the left and right of the parent camera. Scenes rendered with either virtual camera can then be composited together to create a stereoscopic effect.
This object has the following additional properties in addition to the normal CameraNode properties: