# [name]

Base class for scene graph objects.

## Constructor

### [name]()

The constructor takes no arguments.

## Properties

### [property:Integer id]

readonly – Unique number for this object instance.

### [property:String uuid]

[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance. This gets automatically assigned, so this shouldn't be edited.

### [property:String name]

Optional name of the object (doesn't need to be unique).

### [property:Object3D parent]

Object's parent in the scene graph.

### [property:Object3D children]

Array with object's children.

### [property:Vector3 position]

Object's local position.

### [property:Euler rotation]

Object's local rotation (Euler angles), in radians.

### [property:Vector3 scale]

Object's local scale.

### [property:Vector3 up]

Up direction. Default is THREE.Vector3( 0, 1, 0 ).

### [property:Matrix4 matrix]

Local transform.

### [property:Quaternion quaternion]

Object's local rotation as [page:Quaternion Quaternion].

### [property:Boolean visible]

Object gets rendered if *true*.
default – true

### [property:Boolean castShadow]

Gets rendered into shadow map.
default – false

### [property:Boolean receiveShadow]

Material gets baked in shadow receiving.
default – false

### [property:Boolean frustumCulled]

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.
default – true

### [property:Boolean matrixAutoUpdate]

When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
default – true

### [property:Boolean matrixWorldNeedsUpdate]

When this is set, it calculates the matrixWorld in that frame and resets this property to false.
default – false

### [property:object userData]

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.

### [property:Matrix4 matrixWorld]

The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.

## Methods

### [page:EventDispatcher EventDispatcher] methods are available on this class.

### [method:null applyMatrix]( [page:Matrix4 matrix] )

matrix - matrix
This updates the position, rotation and scale with the matrix.

### [method:null translateX]( [page:Float distance] )

distance - Distance.
Translates object along x axis by distance.

### [method:null translateY]( [page:Float distance] )

distance - Distance.
Translates object along y axis by distance.

### [method:null translateZ]( [page:Float distance] )

distance - Distance.
Translates object along z axis by distance.

### [method:null rotateX]( [page:Float rad] )

rad - the angle to rotate in radians.
Rotates the object around x axis in local space.

### [method:null rotateY]( [page:Float rad] )

rad - the angle to rotate in radians.
Rotates the object around y axis in local space.

### [method:null rotateZ]( [page:Float rad] )

rad - the angle to rotate in radians.
Rotates the object around z axis in local space.

### [method:Vector3 localToWorld]( [page:Vector3 vector] )

vector - A local vector.
Updates the vector from local space to world space.

### [method:Vector3 worldToLocal]( [page:Vector3 vector] )

vector - A world vector.
Updates the vector from world space to local space.

### [method:null lookAt]( [page:Vector3 vector] )

vector - A world vector to look at.
Rotates object to face point in space.

### [method:null add]( [page:Object3D object], ... )

object - An object.
Adds *object* as child of this object. An arbitrary number of objects may be added.

### [method:null remove]( [page:Object3D object], ... )

object - An object.
Removes *object* as child of this object. An arbitrary number of objects may be removed.

### [method:null traverse]( [page:Function callback] )

callback - A function with as first argument an object3D object.
Executes the callback on this object and all descendants.

### [method:null traverseVisible]( [page:Function callback] )

callback - A function with as first argument an object3D object.
Like traverse, but the callback will only be executed for visible objects. Descendants of invisible objects are not traversed.

### [method:null traverseAncestors]( [page:Function callback] )

callback - A function with as first argument an object3D object.
Executes the callback on all ancestors.

### [method:null updateMatrix]()

Updates local transform.

### [method:null updateMatrixWorld]( [page:Boolean force] )

Updates global transform of the object and its children.

### [method:Object3D clone]( [page:Boolean recursive] )

recursive -- if true, descendants of the object are also cloned. Default is true.
Returns a clone of this object and optionaly all descendants.

### [method:Object3D getObjectByName]( [page:String name] )

name -- String to match to the children's Object3d.name property.
Searches through the object's children and returns the first with a matching name.

### [method:Object3D getObjectById]( [page:Integer id] )

id -- Unique number of the object instance
Searches through the object's children and returns the first with a matching id.

### [method:Vector3 getWorldPosition]( [page:Vector3 optionalTarget] )

optionalTarget — Optional target to set the result. Otherwise, a new `Vector3` is instantiated. (optional)
Returns a vector representing the position of the object in world space.

### [method:Quaternion getWorldQuaternion]( [page:Quaternion optionalTarget] )

optionalTarget — Optional target to set the result. Otherwise, a new `Quaternion` is instantiated. (optional)
Returns a quaternion representing the rotation of the object in world space.

### [method:Euler getWorldRotation]( [page:Euler optionalTarget] )

optionalTarget — Optional target to set the result. Otherwise, a new `Euler` is instantiated. (optional)
Returns the euler angles representing the rotation of the object in world space.

### [method:Vector3 getWorldScale]( [page:Vector3 optionalTarget] )

optionalTarget — Optional target to set the result. Otherwise, a new `Vector3` is instantiated. (optional)
Returns a vector of the scaling factors applied to the object for each axis in world space.

### [method:Vector3 getWorldDirection]( [page:Vector3 optionalTarget] )

optionalTarget — Optional target to set the result. Otherwise, a new `Vector3` is instantiated. (optional)
Returns a vector representing the direction of object's positive z-axis in world space.

### [method:Object3D translateOnAxis]( [page:Vector3 axis], [page:Float distance] )

axis -- A normalized vector in object space.
distance -- The distance to translate.
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.

### [method:Object3D rotateOnAxis]( [page:Vector3 axis], [page:Float angle] )

axis -- A normalized vector in object space.
angle -- The angle in radians.
Rotate an object along an axis in object space. The axis is assumed to be normalized.

### [method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )

Abstract method to get intersections between a casted ray and this object. Subclasses such as [page:Mesh], [page:Line], and [page:Points] implement this method in order to participate in raycasting.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]