[name]
Base class for scene graph objects.
Constructor
[name]()
The constructor takes no arguments.
Properties
[property:Integer id]
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]
[property:String eulerOrder]
Order of axis for Euler angles.
[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]. Only used when useQuaternion is set to true.
[property:Boolean useQuaternion]
Use quaternion instead of Euler angles for specifying local rotation.
[property:Boolean visible]
Object gets rendered if *true*.
[property:Boolean castShadow]
Gets rendered into shadow map.
[property:Boolean receiveShadow]
Material gets baked in shadow receiving.
[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.
[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.
[property:Boolean matrixWorldNeedsUpdate]
When this is set, it calculates the matrixWorld in that frame and resets this property to false.
[property:Boolean rotationAutoUpdate]
When this is set, then the rotationMatrix gets calculated every frame.
[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.
[method:null remove]( [page:Object3D object] )
object - An object.
Removes *object* as child of this object.
[method:null traverse]( [page:Function callback] )
callback - An Function with as first argument an object3D object.
Executes the callback on this object and all descendants.
[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], [page:Boolean recursive])
name -- String to match to the children's Object3d.name property.
recursive -- 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.
[method:Object3D getObjectById]([page:Integer id], [page:Boolean recursive])
id -- Unique number of the object instance
recursive -- 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 id, optionally recursive.
[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.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]