[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.

[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:Boolean rotationAutoUpdate]

When this is set, then the rotationMatrix gets calculated every frame.
default – true

[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: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 this object and 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]()

Creates a new clone of this object and 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: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:PointCloud] 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]