|
@@ -10,7 +10,13 @@
|
|
|
<body>
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc">Base class for scene graph objects.</div>
|
|
|
+ <div class="desc">
|
|
|
+ This is the base class for most objects in Three and provides a set of properties and methods
|
|
|
+ for manipulating objects in 3D space.<br /><br />
|
|
|
+
|
|
|
+ Note that this can be used for grouping objects via the [page:.add]( object ) method
|
|
|
+ which adds the object as a child, however it is better to use [page:Group] for this.
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
<h2>Constructor</h2>
|
|
@@ -24,283 +30,366 @@
|
|
|
|
|
|
<h2>Properties</h2>
|
|
|
|
|
|
- <h3>[property:Integer id]</h3>
|
|
|
- <div>
|
|
|
- readonly – Unique number for this object instance.
|
|
|
- </div>
|
|
|
+ <h3>[property:Boolean castShadow]</h3>
|
|
|
+ <div>Whether the object gets rendered into shadow map. Default is *false*.</div>
|
|
|
|
|
|
- <h3>[property:String uuid]</h3>
|
|
|
- <div>
|
|
|
- [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance.
|
|
|
- This gets automatically assigned, so this shouldn't be edited.
|
|
|
- </div>
|
|
|
+ <h3>[property:Object3D children]</h3>
|
|
|
+ <div>Array with object's children. See [page:Group] for info on manually grouping objects.</div>
|
|
|
|
|
|
- <h3>[property:String name]</h3>
|
|
|
+ <h3>[property:Boolean frustumCulled]</h3>
|
|
|
<div>
|
|
|
- Optional name of the object (doesn't need to be unique).
|
|
|
+ When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object.
|
|
|
+ Otherwise the object gets renderered every frame even if it isn't visible. Default is *true*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Object3D parent]</h3>
|
|
|
- <div>
|
|
|
- Object's parent in the scene graph.
|
|
|
- </div>
|
|
|
+ <h3>[property:Integer id]</h3>
|
|
|
+ <div>readonly – Unique number for this object instance.</div>
|
|
|
|
|
|
- <h3>[property:Object3D children]</h3>
|
|
|
+ <h3>[property:Boolean isObject]</h3>
|
|
|
<div>
|
|
|
- Array with object's children.
|
|
|
- </div>
|
|
|
+ Used to check whether this or derived classes are Object3Ds. Default is *true*.<br /><br />
|
|
|
|
|
|
- <h3>[property:Vector3 position]</h3>
|
|
|
- <div>
|
|
|
- Object's local position.
|
|
|
+ You should not change this, as it used internally for optimisation.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Euler rotation]</h3>
|
|
|
+ <h3>[property:Layers layers]</h3>
|
|
|
<div>
|
|
|
- Object's local rotation (<a href="https://en.wikipedia.org/wiki/Euler_angles" target="_blank">Euler angles</a>), in radians.
|
|
|
+ The layer membership of the object. The object is only visible if it has at least one
|
|
|
+ layer in common with the [page:Camera] in use.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Vector3 scale]</h3>
|
|
|
- <div>
|
|
|
- Object's local scale.
|
|
|
- </div>
|
|
|
+ <h3>[property:Matrix4 matrix]</h3>
|
|
|
+ <div>The local transform matrix.</div>
|
|
|
|
|
|
- <h3>[property:Vector3 up]</h3>
|
|
|
+ <h3>[property:Boolean matrixAutoUpdate]</h3>
|
|
|
<div>
|
|
|
- Up direction. Default is THREE.Vector3( 0, 1, 0 ).
|
|
|
+ When this is set, it calculates the matrix of position, (rotation or quaternion) and
|
|
|
+ scale every frame and also recalculates the matrixWorld property. Default is *true*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Matrix4 matrix]</h3>
|
|
|
+ <h3>[property:Matrix4 matrixWorld]</h3>
|
|
|
<div>
|
|
|
- Local transform.
|
|
|
+ The global transform of the object. If the Object3d has no parent, then it's identical to
|
|
|
+ the local transform [page:.matrix].
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Quaternion quaternion]</h3>
|
|
|
+ <h3>[property:Boolean matrixWorldNeedsUpdate]</h3>
|
|
|
<div>
|
|
|
- Object's local rotation as [page:Quaternion Quaternion].
|
|
|
+ When this is set, it calculates the matrixWorld in that frame and resets this property
|
|
|
+ to false. Default is *false*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Boolean visible]</h3>
|
|
|
- <div>
|
|
|
- Object gets rendered if *true*.
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- default – true
|
|
|
- </div>
|
|
|
+ <h3>[property:Matrix4 modelViewMatrix]</h3>
|
|
|
+ <div>This is passed to the shader and used to calculate the position of the object.</div>
|
|
|
|
|
|
- <h3>[property:Boolean castShadow]</h3>
|
|
|
+ <h3>[property:String name]</h3>
|
|
|
+ <div>Optional name of the object (doesn't need to be unique). Default is an empty string.</div>
|
|
|
+
|
|
|
+ <h3>[property:Matrix3 normalMatrix]</h3>
|
|
|
+ <div>This is passed to the shader and used to calculate lighting for the object.</div>
|
|
|
+
|
|
|
+ <h3>[property:function onAfterRender]</h3>
|
|
|
<div>
|
|
|
- Gets rendered into shadow map.
|
|
|
+ An optional callback that is executed immediately after the Object3D is rendered.
|
|
|
+ This function is called with the following parameters: renderer, scene, camera, geometry,
|
|
|
+ material, group.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[property:function onBeforeRender]</h3>
|
|
|
<div>
|
|
|
- default – false
|
|
|
+ An optional callback that is executed immediately before the Object3D is rendered.
|
|
|
+ This function is called with the following parameters: renderer, scene, camera, geometry,
|
|
|
+ material, group.
|
|
|
</div>
|
|
|
|
|
|
+ <h3>[property:Object3D parent]</h3>
|
|
|
+ <div>Object's parent in the [link:https://en.wikipedia.org/wiki/Scene_graph scene graph].</div>
|
|
|
+
|
|
|
+ <h3>[property:Vector3 position]</h3>
|
|
|
+ <div>The object's local position.</div>
|
|
|
+
|
|
|
+ <h3>[property:Quaternion quaternion]</h3>
|
|
|
+ <div>Object's local rotation as a [page:Quaternion Quaternion].</div>
|
|
|
+
|
|
|
<h3>[property:Boolean receiveShadow]</h3>
|
|
|
- <div>
|
|
|
- Material gets baked in shadow receiving.
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- default – false
|
|
|
- </div>
|
|
|
+ <div>Whether the material receives shadows. Default is *false*.</div>
|
|
|
|
|
|
- <h3>[property:Boolean frustumCulled]</h3>
|
|
|
- <div>
|
|
|
- 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.
|
|
|
- </div>
|
|
|
+ <h3>[property:Number renderOrder]</h3>
|
|
|
<div>
|
|
|
- default – true
|
|
|
+ This value allows the default rendering order of [link:https://en.wikipedia.org/wiki/Scene_graph scene graph]
|
|
|
+ objects to be overridden although opaque and transparent objects remain sorted independently.
|
|
|
+ Sorting is from lowest to highest renderOrder. Default value is *0*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Boolean matrixAutoUpdate]</h3>
|
|
|
- <div>
|
|
|
- When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
|
|
|
- </div>
|
|
|
+ <h3>[property:Euler rotation]</h3>
|
|
|
<div>
|
|
|
- default – true
|
|
|
+ Object's local rotation (see [link:https://en.wikipedia.org/wiki/Euler_angles Euler angles]), in radians.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Boolean matrixWorldNeedsUpdate]</h3>
|
|
|
- <div>
|
|
|
- When this is set, it calculates the matrixWorld in that frame and resets this property to false.
|
|
|
- </div>
|
|
|
+ <h3>[property:Vector3 scale]</h3>
|
|
|
<div>
|
|
|
- default – false
|
|
|
+ The object's local [property:Vector3 scale]. Default is [page:Vector3]( 1, 1, 1 ).
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Boolean rotationAutoUpdate]</h3>
|
|
|
- <div>
|
|
|
- When this is set, then the rotationMatrix gets calculated every frame.
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- default – true
|
|
|
- </div>
|
|
|
+ <h3>[property:Vector3 up]</h3>
|
|
|
+ <div>Up direction. Default is [page:Vector3]( 0, 1, 0 ).</div>
|
|
|
|
|
|
<h3>[property:object userData]</h3>
|
|
|
<div>
|
|
|
- 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.
|
|
|
+ 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.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[property:Matrix4 matrixWorld]</h3>
|
|
|
+ <h3>[property:String uuid]</h3>
|
|
|
<div>
|
|
|
- The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
|
|
|
+ [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance.
|
|
|
+ This gets automatically assigned, so this shouldn't be edited.
|
|
|
</div>
|
|
|
|
|
|
+ <h3>[property:Boolean visible]</h3>
|
|
|
+ <div>Object gets rendered if *true*. Default is *true*.</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
|
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
|
|
|
|
|
- <h3>[method:null applyMatrix]( [page:Matrix4 matrix])</h3>
|
|
|
+ <h3>[method:null add]( [page:Object3D object], ... )</h3>
|
|
|
<div>
|
|
|
- matrix - matrix
|
|
|
+ Adds *object* as child of this object. An arbitrary number of objects may be added.<br /><br />
|
|
|
+
|
|
|
+ See [page:Group] for info on manually grouping objects.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:null applyMatrix]( [page:Matrix4 matrix] )</h3>
|
|
|
+ <div>This updates the position, rotation and scale with the matrix.</div>
|
|
|
+
|
|
|
+ <h3>[method:Object3D clone]( [page:Boolean recursive] )</h3>
|
|
|
<div>
|
|
|
- This updates the position, rotation and scale with the matrix.
|
|
|
+ recursive -- if true, descendants of the object are also cloned. Default is true.<br /><br />
|
|
|
+
|
|
|
+ Returns a clone of this object and optionaly all descendants.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null translateX]( [page:Float distance] )</h3>
|
|
|
+ <h3>[method:Object3D copy]( [page:Object3D object], [page:Boolean recursive] )</h3>
|
|
|
<div>
|
|
|
- distance - Distance.<br />
|
|
|
+ recursive -- if true, descendants of the object are also copied. Default is true.<br /><br />
|
|
|
+
|
|
|
+ Copy the given object into this object.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Object3D getObjectById]( [page:Integer id] )</h3>
|
|
|
<div>
|
|
|
- Translates object along x axis by distance.
|
|
|
+ id -- Unique number of the object instance<br /><br />
|
|
|
+
|
|
|
+ Searches through the object's children and returns the first with a matching id.<br />
|
|
|
+ Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null translateY]( [page:Float distance] )</h3>
|
|
|
+ <h3>[method:Object3D getObjectByName]( [page:String name] )</h3>
|
|
|
<div>
|
|
|
- distance - Distance.<br />
|
|
|
+ name -- String to match to the children's Object3d.name property. <br /><br />
|
|
|
+
|
|
|
+ Searches through the object's children and returns the first with a matching name.<br />
|
|
|
+ Note that for most objects the [property:name] is an empty string by default. You will
|
|
|
+ have to set it manually to make use of this method.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Object3D getObjectByProperty]( [page:String name], [page:Float value] )</h3>
|
|
|
<div>
|
|
|
- Translates object along y axis by distance.
|
|
|
+ name -- the property name to search for. <br />
|
|
|
+ value -- value of the given property. <br /><br />
|
|
|
+
|
|
|
+ Searches through the object's children and returns the first with a property that matches the aclue given.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null translateZ]( [page:Float distance] )</h3>
|
|
|
+ <h3>[method:Vector3 getWorldPosition]( [page:Vector3 optionalTarget] )</h3>
|
|
|
<div>
|
|
|
- distance - Distance.<br />
|
|
|
+ optionalTarget — (optional) target to set the result. Otherwise, a new [page:Vector3] is instantiated. <br /><br />
|
|
|
+
|
|
|
+ Returns a vector representing the position of the object in world space.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Quaternion getWorldQuaternion]( [page:Quaternion optionalTarget] )</h3>
|
|
|
<div>
|
|
|
- Translates object along z axis by distance.
|
|
|
+ optionalTarget — (optional) target to set the result. Otherwise, a new [page:Quaternion] is
|
|
|
+ instantiated. <br /><br />
|
|
|
+
|
|
|
+ Returns a quaternion representing the rotation of the object in world space.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 localToWorld]( [page:Vector3 vector] )</h3>
|
|
|
+ <h3>[method:Euler getWorldRotation]( [page:Euler optionalTarget] )</h3>
|
|
|
<div>
|
|
|
- vector - A local vector.<br />
|
|
|
+ optionalTarget — (optional) target to set the result. Otherwise, a new [page:Euler] is instantiated.<br /><br />
|
|
|
+
|
|
|
+ Returns the euler angles representing the rotation of the object in world space.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Vector3 getWorldScale]( [page:Vector3 optionalTarget] )</h3>
|
|
|
<div>
|
|
|
- Updates the vector from local space to world space.
|
|
|
+ optionalTarget — (optional) target to set the result. Otherwise, a new [page:Vector3] is instantiated.<br /><br />
|
|
|
+
|
|
|
+ Returns a vector of the scaling factors applied to the object for each axis in world space.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 worldToLocal]( [page:Vector3 vector] )</h3>
|
|
|
+ <h3>[method:Vector3 getWorldDirection]( [page:Vector3 optionalTarget] )</h3>
|
|
|
<div>
|
|
|
- vector - A world vector.<br />
|
|
|
+ optionalTarget — (optional) target to set the result. Otherwise, a new [page:Vector3] is instantiated.<br /><br />
|
|
|
+
|
|
|
+ Returns a vector representing the direction of object's positive z-axis in world space.
|
|
|
</div>
|
|
|
+
|
|
|
+
|
|
|
+ <h3>[method:Vector3 localToWorld]( [page:Vector3 vector] )</h3>
|
|
|
<div>
|
|
|
- Updates the vector from world space to local space.
|
|
|
+ vector - A vector representing a position in local (object) spave.<br /><br />
|
|
|
+
|
|
|
+ Converts the vector from local space to world space.
|
|
|
</div>
|
|
|
|
|
|
<h3>[method:null lookAt]( [page:Vector3 vector] )</h3>
|
|
|
<div>
|
|
|
- vector - A world vector to look at.<br />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- Rotates object to face point in space.
|
|
|
- </div>
|
|
|
+ vector - A vector representing a position in world space.<br /><br />
|
|
|
|
|
|
- <h3>[method:null add]( [page:Object3D object], ... )</h3>
|
|
|
- <div>
|
|
|
- object - An object.<br />
|
|
|
+ Rotates the object to face a point in world space.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )</h3>
|
|
|
<div>
|
|
|
- Adds *object* as child of this object. An arbitrary number of objects may be added.
|
|
|
+ Abstract (empty) 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 use raycasting.
|
|
|
</div>
|
|
|
|
|
|
<h3>[method:null remove]( [page:Object3D object], ... )</h3>
|
|
|
<div>
|
|
|
- object - An object.<br />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
Removes *object* as child of this object. An arbitrary number of objects may be removed.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null traverse]( [page:Function callback] )</h3>
|
|
|
- <div>
|
|
|
- callback - A function with as first argument an object3D object.<br />
|
|
|
- </div>
|
|
|
+ <h3>[method:Object3D rotateOnAxis]( [page:Vector3 axis], [page:Float angle] )</h3>
|
|
|
<div>
|
|
|
- Executes the callback on this object and all descendants.
|
|
|
- </div>
|
|
|
+ axis -- A normalized vector in object space. <br />
|
|
|
+ angle -- The angle in radians.<br /><br />
|
|
|
|
|
|
- <h3>[method:null traverseVisible]( [page:Function callback] )</h3>
|
|
|
- <div>
|
|
|
- callback - A function with as first argument an object3D object.<br />
|
|
|
+ Rotate an object along an axis in object space. The axis is assumed to be normalized.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:null rotateX]( [page:Float rad] )</h3>
|
|
|
<div>
|
|
|
- Like traverse, but the callback will only be executed for visible objects.
|
|
|
- Descendants of invisible objects are not traversed.
|
|
|
+ rad - the angle to rotate in radians.<br /><br />
|
|
|
+
|
|
|
+ Rotates the object around x axis in local space.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null traverseAncestors]( [page:Function callback] )</h3>
|
|
|
+ <h3>[method:null rotateY]( [page:Float rad] )</h3>
|
|
|
<div>
|
|
|
- callback - A function with as first argument an object3D object.<br />
|
|
|
+ rad - the angle to rotate in radians.<br /><br />
|
|
|
+
|
|
|
+ Rotates the object around y axis in local space.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:null rotateZ]( [page:Float rad] )</h3>
|
|
|
<div>
|
|
|
- Executes the callback on all ancestors.
|
|
|
+ rad - the angle to rotate in radians.<br /><br />
|
|
|
+
|
|
|
+ Rotates the object around z axis in local space.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null updateMatrix]()</h3>
|
|
|
+ <h3>[method:null setRotationFromAxisAngle]( [page:Vector3 axis], [page:Float angle] )</h3>
|
|
|
<div>
|
|
|
- Updates local transform.
|
|
|
+ axis -- A normalized vector in object space. <br />
|
|
|
+ angle -- angle in radians<br /><br />
|
|
|
+
|
|
|
+ Calls [page:Quaternion.setFromAxisAngle setFromAxisAngle]( [page:Float axis], [page:Float angle] )
|
|
|
+ on the [page:.quaternion].
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null updateMatrixWorld]( [page:Boolean force] )</h3>
|
|
|
+ <h3>[method:null setRotationFromEuler]( [page:Euler euler] )</h3>
|
|
|
<div>
|
|
|
- Updates global transform of the object and its children.
|
|
|
+ euler -- Euler angle specifying rotation amount.<br />
|
|
|
+
|
|
|
+ Calls [page:Quaternion.setRotationFromEuler setRotationFromEuler]( [page:Euler euler])
|
|
|
+ on the [page:.quaternion].
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Object3D clone]()</h3>
|
|
|
+ <h3>[method:null setRotationFromMatrix]( [page:Matrix4 m] )</h3>
|
|
|
<div>
|
|
|
- Creates a new clone of this object and all descendants.
|
|
|
- </div>
|
|
|
+ m -- rotate the quaternion by the rotation component of the matrix.<br />
|
|
|
|
|
|
+ Calls [page:Quaternion.setFromRotationMatrix setFromRotationMatrix]( [page:Matrix4 m])
|
|
|
+ on the [page:.quaternion].<br /><br />
|
|
|
|
|
|
- <h3>[method:Object3D getObjectByName]([page:String name])</h3>
|
|
|
- <div>
|
|
|
- name -- String to match to the children's Object3d.name property. <br />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- Searches through the object's children and returns the first with a matching name.
|
|
|
+ Note that this assumes that the upper 3x3 of m is a pure rotation matrix (i.e, unscaled).
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Object3D getObjectById]([page:Integer id])</h3>
|
|
|
+ <h3>[method:null setRotationFromQuaternion]( [page:Quaternion q] )</h3>
|
|
|
<div>
|
|
|
- id -- Unique number of the object instance<br />
|
|
|
+ q -- normalized Quaternion.<br /><br />
|
|
|
+
|
|
|
+ Copy the given quaternion into [page:.quaternion].
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:null toJSON]( [page:Quaternion q] )</h3>
|
|
|
<div>
|
|
|
- Searches through the object's children and returns the first with a matching id.
|
|
|
+ Convert the object to JSON format.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Object3D translateOnAxis]([page:Vector3 axis], [page:Float distance])</h3>
|
|
|
+ <h3>[method:Object3D translateOnAxis]( [page:Vector3 axis], [page:Float distance] )</h3>
|
|
|
<div>
|
|
|
axis -- A normalized vector in object space.<br />
|
|
|
- distance -- The distance to translate.
|
|
|
+ distance -- The distance to translate.<br /><br />
|
|
|
+
|
|
|
+ Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:null translateX]( [page:Float distance] )</h3>
|
|
|
+ <div>Translates object along x axis by *distance* units.</div>
|
|
|
+
|
|
|
+ <h3>[method:null translateY]( [page:Float distance] )</h3>
|
|
|
+ <div>Translates object along y axis by *distance* units.</div>
|
|
|
+
|
|
|
+ <h3>[method:null translateZ]( [page:Float distance] )</h3>
|
|
|
+ <div>Translates object along z axis by *distance* units.</div>
|
|
|
+
|
|
|
+ <h3>[method:null traverse]( [page:Function callback] )</h3>
|
|
|
<div>
|
|
|
- Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
|
|
|
+ callback - A function with as first argument an object3D object.<br /><br />
|
|
|
+
|
|
|
+ Executes the callback on this object and all descendants.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Object3D rotateOnAxis]([page:Vector3 axis], [page:Float angle])</h3>
|
|
|
+ <h3>[method:null traverseVisible]( [page:Function callback] )</h3>
|
|
|
<div>
|
|
|
- axis -- A normalized vector in object space. <br />
|
|
|
- angle -- The angle in radians.
|
|
|
+ callback - A function with as first argument an object3D object.<br /><br />
|
|
|
+
|
|
|
+ Like traverse, but the callback will only be executed for visible objects.
|
|
|
+ Descendants of invisible objects are not traversed.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:null traverseAncestors]( [page:Function callback] )</h3>
|
|
|
<div>
|
|
|
- Rotate an object along an axis in object space. The axis is assumed to be normalized.
|
|
|
+ callback - A function with as first argument an object3D object.<br /><br />
|
|
|
+
|
|
|
+ Executes the callback on all ancestors.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Array raycast]([page:Raycaster raycaster], [page:Array intersects])</h3>
|
|
|
+ <h3>[method:null updateMatrix]()</h3>
|
|
|
+ <div>Update the local transform.</div>
|
|
|
+
|
|
|
+ <h3>[method:null updateMatrixWorld]( [page:Boolean force] )</h3>
|
|
|
+ <div>Update the global transform of the object and its children.</div>
|
|
|
+
|
|
|
+
|
|
|
+ <h3>[method:Vector3 worldToLocal]( [page:Vector3 vector] )</h3>
|
|
|
<div>
|
|
|
- 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.
|
|
|
+ vector - A world vector.<br /><br />
|
|
|
+
|
|
|
+ Updates the vector from world space to local space.
|
|
|
</div>
|
|
|
|
|
|
<h2>Source</h2>
|