Camera with perspective projection.
var camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 );
scene.add( camera );
Camera frustum vertical field of view. Default value is 50.
Camera frustum aspect ratio. Default value is 1.
Camera frustum near plane. Default value is 0.1.
Camera frustum far plane. Default value is 2000.
Camera frustum aspect ratio, window width divided by window height.
Gets rendered into shadow map.
Array with object's children.
Order of axis for Euler angles.
Camera frustum far plane.
Camera frustum vertical field of view, from bottom to top of view, in degrees.
When this is set, it checks every frame if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible.
Unique number of this object instance.
Local transform.
When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
This is the inverse of matrixWorld. MatrixWorld contains the Matrix which has the world transform of the Camera.
When this is set, it calculates the matrixWorld in that frame and resets this property to false.
Optional name of the object (doesn't need to be unique).
Camera frustum near plane.
Object's parent in the scene graph.
Object's local position.
This is the matrix which contains the projection.
Global rotation.
Material gets baked in shadow receiving.
Override depth-sorting order if non null.
Object's local rotation (Euler angles), in radians.
When this is set, then the rotationMatrix gets calculated every frame.
Object's local scale.
Up direction.
Use quaternion instead of Euler angles for specifying local rotation.
An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned.
Object gets rendered if true.
Adds object as child of this object.
This updates the position, rotation and scale with the matrix.
Searches whole subgraph recursively to add all objects in the array.
optional argument that returns the the array with descendants.
Object3D[]
Searches through the object's children and returns the first with a matching id, optionally recursive.
Unique number of the object instance
Boolean whether to search through the children's children. Default is false.
Searches through the object's children and returns the first with a matching name, optionally recursive.
String to match to the children's Object3d.name property.
Boolean whether to search through the children's children. Default is false.
Updates the vector from local space to world space.
A local vector.
This make the camera look at the vector position in local space.
point to look at
Removes object as child of this object.
Rotate an object along an axis in object space. The axis is assumed to be normalized.
A normalized vector in object space.
The angle in radians.
Uses focal length (in mm) to estimate and set FOV 35mm (fullframe) camera is used if frame size is not specified. Formula based on http://www.bobatkins.com/photography/technical/field_of_view.html
focal length
frame size. Default value is 24.
Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups. For example, if you have 3x2 monitors and each monitor is 1920x1080 and the monitors are in grid like this:
+---+---+---+
| A | B | C |
+---+---+---+
| D | E | F |
+---+---+---+
then for each monitor you would call it like this:
var w = 1920;
var h = 1080;
var fullWidth = w * 3;
var fullHeight = h * 2;
// A
camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
// B
camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
// C
camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
// D
camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
// E
camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
// F
camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); Note there is no reason monitors have to be the same size or in a grid.
full width of multiview setup
full height of multiview setup
horizontal offset of subcamera
vertical offset of subcamera
width of subcamera
height of subcamera
A normalized vector in object space.
The distance to translate.
Translates object along x axis by distance.
Distance.
Translates object along y axis by distance.
Distance.
Translates object along z axis by distance.
Distance.
Translates object along arbitrary axis by distance.
Updates local transform.
Updates global transform of the object and its children.
Updates the camera projection matrix. Must be called after change of parameters.
Updates the vector from world space to local space.
A world vector.