[name]
Base class for scene graph objects.
Constructor
[name]()
The constructor takes no arguments.
Properties
.[page:Integer id]
Unique number of this object instance.
.[page:String name]
Optional name of the object (doesn't need to be unique).
.[page:Object3D parent]
Object's parent in the scene graph.
.[page:Object3D children]
Array with object's children.
.[page:Vector3 position]
Object's local position.
.[page:Euler rotation]
.[page:String eulerOrder]
Order of axis for Euler angles.
.[page:Vector3 scale]
Object's local scale.
.[page:Vector3 up]
Up direction.
.[page:Matrix4 matrix]
Local transform.
.[page:Quaternion quaternion]
Object's local rotation as [page:Quaternion Quaternion]. Only used when useQuaternion is set to true.
.[page:Boolean useQuaternion]
Use quaternion instead of Euler angles for specifying local rotation.
.[page:Float renderDepth]
Override depth-sorting order if non *null*.
.[page:Boolean visible]
Object gets rendered if *true*.
.[page:Boolean castShadow]
Gets rendered into shadow map.
.[page:Boolean receiveShadow]
Material gets baked in shadow receiving.
.[page: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.
.[page: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.
.[page:Boolean matrixWorldNeedsUpdate]
When this is set, it calculates the matrixWorld in that frame and resets this property to false.
.[page:Boolean rotationAutoUpdate]
When this is set, then the rotationMatrix gets calculated every frame.
.[page: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.
.[page: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.
.applyMatrix( [page:Matrix4 matrix])
matrix - matrix
This updates the position, rotation and scale with the matrix.
.translateX( [page:Float distance] )
distance - Distance.
Translates object along x axis by distance.
.translateY( [page:Float distance] )
distance - Distance.
Translates object along y axis by distance.
.translateZ( [page:Float distance] )
distance - Distance.
Translates object along z axis by distance.
.localToWorld( [page:Vector3 vector] )
vector - A local vector.
Updates the vector from local space to world space.
.worldToLocal( [page:Vector3 vector] )
vector - A world vector.
Updates the vector from world space to local space.
.lookAt( [page:Vector3 vector] )
vector - A world vector to look at.
Rotates object to face point in space.
.add( [page:Object3D object] )
object - An object.
Adds *object* as child of this object.
.remove( [page:Object3D object] )
object - An object.
Removes *object* as child of this object.
.traverse( [page:Function callback] )
callback - An Function with as first argument an object3D object.
Executes the callback on this object and all descendants.
.updateMatrix()
Updates local transform.
.updateMatrixWorld( [page:Boolean force] )
Updates global transform of the object and its children.
.clone()
Creates a new clone of this object and all descendants.
.getObjectByName([page:String name], [page:Boolean recursive]) [page:Object3d Object3d]
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.
.getObjectById([page:Integer id], [page:Boolean recursive]) [page:Object3D]
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.
.translateOnAxis([page:Vector3 axis], [page:Float distance]) [page:Object3D]
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.
.rotateOnAxis([page:Vector3 axis], [page:Float angle]) [page:Object3D]
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]