Class: Line<TGeometry, TMaterial, TEventMap>
Defined in: node_modules/@types/three/src/objects/Line.d.ts:27
A continuous line.
Remarks
This is nearly the same as LineSegments, the only difference is that it is rendered using gl.LINE_STRIP instead of gl.LINES
Example
const material = new THREE.LineBasicMaterial({
color: 0x0000ff
});
const points = [];
points.push(new THREE.Vector3(-10, 0, 0));
points.push(new THREE.Vector3(0, 10, 0));
points.push(new THREE.Vector3(10, 0, 0));
const geometry = new THREE.BufferGeometry().setFromPoints(points);
const {@link Line} = new THREE.Line(geometry, material);
scene.add(line);
See
Extends
Object3D<TEventMap>
Extended by
Type Parameters
TGeometry
TGeometry extends BufferGeometry = BufferGeometry
TMaterial
TMaterial extends Material | Material[] = Material | Material[]
TEventMap
TEventMap extends Object3DEventMap = Object3DEventMap
Constructors
Constructor
new Line<
TGeometry,TMaterial,TEventMap>(geometry?,material?):Line<TGeometry,TMaterial,TEventMap>
Defined in: node_modules/@types/three/src/objects/Line.d.ts:37
Create a new instance of Line
Parameters
geometry?
TGeometry
Vertices representing the Line segment(s). Default `new THREE.BufferGeometry()`.
material?
TMaterial
Material for the line. Default `new THREE.LineBasicMaterial()`.
Returns
Line<TGeometry, TMaterial, TEventMap>
Overrides
Properties
animations
animations:
AnimationClip[]
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:269
Array with object's animation clips.
Default Value
[]
Inherited from
castShadow
castShadow:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:241
Whether the object gets rendered into shadow map.
Default Value
false
Inherited from
children
children:
Object3D<Object3DEventMap>[]
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:148
Array with object's children.
See
THREE.Object3DGroup | Group for info on manually grouping objects.
Default Value
[]
Inherited from
count?
optionalcount:number
Defined in: node_modules/@types/three/src/renderers/common/Backend.d.ts:8
Inherited from
customDepthMaterial?
optionalcustomDepthMaterial:Material<MaterialEventMap>
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:278
Custom depth material to be used when rendering to the depth map.
Remarks
Can only be used in context of meshes. When shadow-casting with a DirectionalLight or SpotLight, if you are modifying vertex positions in the vertex shader you must specify a customDepthMaterial for proper shadows.
Default Value
undefined
Inherited from
customDistanceMaterial?
optionalcustomDistanceMaterial:Material<MaterialEventMap>
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:284
Same as customDepthMaterial, but used with THREE.Object3DPointLight | PointLight.
Default Value
undefined
Inherited from
Object3D.customDistanceMaterial
frustumCulled
frustumCulled:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:254
When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object.
If set to false the object gets rendered every frame even if it is not in the frustum of the camera.
Default Value
true
Inherited from
geometry
geometry:
TGeometry
Defined in: node_modules/@types/three/src/objects/Line.d.ts:55
Vertices representing the Line segment(s).
id
readonlyid:number
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:112
Unique number for this Object3D instance.
Remarks
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
Expects a Integer
Inherited from
isLine
readonlyisLine:true
Defined in: node_modules/@types/three/src/objects/Line.d.ts:44
Read-only flag to check if a given object is of type Line.
Remarks
This is a constant value
Default Value
true
isObject3D
readonlyisObject3D:true
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:105
Flag to check if a given object is of type Object3D.
Remarks
This is a constant value
Default Value
true
Inherited from
layers
layers:
Layers
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:229
The layer membership of the object.
Remarks
The object is only visible if it has at least one layer in common with the THREE.Object3DCamera | Camera in use. This property can also be used to filter out unwanted objects in ray-intersection tests when using Raycaster.
Default Value
new THREE.Layers()
Inherited from
material
material:
TMaterial
Defined in: node_modules/@types/three/src/objects/Line.d.ts:60
Material for the line.
matrix
matrix:
Matrix4
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:194
The local transform matrix.
Default Value
new THREE.Matrix4()
Inherited from
matrixAutoUpdate
matrixAutoUpdate:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:208
When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
Default Value
DEFAULT_MATRIX_AUTO_UPDATE - that is (true).
Inherited from
matrixWorld
matrixWorld:
Matrix4
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:201
The global transform of the object.
Remarks
If the Object3D has no parent, then it's identical to the local transform .matrix.
Default Value
new THREE.Matrix4()
Inherited from
matrixWorldAutoUpdate
matrixWorldAutoUpdate:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:215
If set, then the renderer checks every frame if the object and its children need matrix updates. When it isn't, then you have to maintain all matrices in the object and its children yourself.
Default Value
DEFAULT_MATRIX_WORLD_AUTO_UPDATE - that is (true).
Inherited from
Object3D.matrixWorldAutoUpdate
matrixWorldNeedsUpdate
matrixWorldNeedsUpdate:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:221
When this is set, it calculates the matrixWorld in that frame and resets this property to false.
Default Value
false
Inherited from
Object3D.matrixWorldNeedsUpdate
modelViewMatrix
readonlymodelViewMatrix:Matrix4
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:183
Default Value
new THREE.Matrix4()
Inherited from
morphTargetDictionary?
optionalmorphTargetDictionary:object
Defined in: node_modules/@types/three/src/objects/Line.d.ts:72
A dictionary of morphTargets based on the morphTarget.name property.
Index Signature
[key: string]: number
Default Value
undefined, but reset to a blank array by .updateMorphTargets().
morphTargetInfluences?
optionalmorphTargetInfluences:number[]
Defined in: node_modules/@types/three/src/objects/Line.d.ts:66
An array of weights typically from 0-1 that specify how much of the morph is applied.
Default Value
undefined, but reset to a blank array by .updateMorphTargets().
name
name:
string
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:125
Optional name of the object
Remarks
(doesn't need to be unique).
Default Value
""
Inherited from
normalMatrix
readonlynormalMatrix:Matrix3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:188
Default Value
new THREE.Matrix3()
Inherited from
occlusionTest?
optionalocclusionTest:boolean
Defined in: node_modules/@types/three/src/renderers/common/Backend.d.ts:10
Inherited from
parent
parent:
Object3D<Object3DEventMap>
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:140
Object's parent in the scene graph.
Remarks
An object can have at most one parent.
Default Value
null
Inherited from
pivot
pivot:
Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:312
The pivot point for rotation and scale transformations. When set, rotation and scale are applied around this point instead of the object's origin.
Default
null
Inherited from
position
readonlyposition:Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:160
Object's local position.
Default Value
new THREE.Vector3() - that is (0, 0, 0).
Inherited from
quaternion
readonlyquaternion:Quaternion
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:172
Object's local rotation as a Quaternion.
Default Value
new THREE.Quaternion() - that is (0, 0, 0, 1).
Inherited from
receiveShadow
receiveShadow:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:247
Whether the material receives shadows.
Default Value
false
Inherited from
renderOrder
renderOrder:
number
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:263
This value allows the default rendering order of scene graph objects to be overridden although opaque and transparent objects remain sorted independently.
Remarks
When this property is set for an instance of Group, all descendants objects will be sorted and rendered together. Sorting is from lowest to highest renderOrder.
Default Value
0
Inherited from
rotation
readonlyrotation:Euler
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:166
Object's local rotation (Euler angles), in radians.
Default Value
new THREE.Euler() - that is (0, 0, 0, Euler.DEFAULT_ORDER).
Inherited from
scale
readonlyscale:Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:178
The object's local scale.
Default Value
new THREE.Vector3( 1, 1, 1 )
Inherited from
static
static:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:296
Whether the 3D object is supposed to be static or not. If set to true, it means
the 3D object is not going to be changed after the initial renderer. This includes
geometry and material settings. A static 3D object can be processed by the renderer
slightly faster since certain state checks can be bypassed.
Only relevant in context of WebGPURenderer.
Default
false
Inherited from
type
readonlytype:string
Defined in: node_modules/@types/three/src/objects/Line.d.ts:50
Default Value
Line
Overrides
up
up:
Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:154
This is used by the lookAt method, for example, to determine the orientation of the result.
Default Value
Object3D.DEFAULT_UP - that is (0, 1, 0).
Inherited from
userData
userData:
Record<string,any>
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:303
An object that can be used to store custom data about the Object3D.
Remarks
It should not hold references to functions as these will not be cloned.
Default
{}
Inherited from
uuid
uuid:
string
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:118
UUID of this object instance.
Remarks
This gets automatically assigned and shouldn't be edited.
Inherited from
visible
visible:
boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:235
Object gets rendered if true.
Default Value
true
Inherited from
DEFAULT_MATRIX_AUTO_UPDATE
staticDEFAULT_MATRIX_AUTO_UPDATE:boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:397
The default setting for matrixAutoUpdate for newly created Object3Ds.
Default Value
true
Inherited from
Object3D.DEFAULT_MATRIX_AUTO_UPDATE
DEFAULT_MATRIX_WORLD_AUTO_UPDATE
staticDEFAULT_MATRIX_WORLD_AUTO_UPDATE:boolean
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:403
The default setting for matrixWorldAutoUpdate for newly created Object3Ds.
Default Value
true
Inherited from
Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE
DEFAULT_UP
staticDEFAULT_UP:Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:391
The default up direction for objects, also used as the default position for DirectionalLight, HemisphereLight and THREE.Spotlight | Spotlight (which creates lights shining from the top down).
Default Value
new THREE.Vector3( 0, 1, 0)
Inherited from
Methods
add()
add(...
object):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:539
Adds another Object3D as child of this Object3D.
Parameters
object
...Object3D<Object3DEventMap>[]
Returns
this
Remarks
An arbitrary number of objects may be added Any current parent on an object passed in here will be removed, since an Object3D can have at most one parent.
See
Inherited from
addEventListener()
addEventListener<
T>(type,listener):void
Defined in: node_modules/@types/three/src/core/EventDispatcher.d.ts:52
Adds a listener to an event type.
Type Parameters
T
T extends string
Parameters
type
T
The type of event to listen to.
listener
EventListener<TEventMap[T], T, Line<TGeometry, TMaterial, TEventMap>>
The function that gets called when the event is fired.
Returns
void
Inherited from
applyMatrix4()
applyMatrix4(
matrix):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:409
Applies the matrix transform to the object and updates the object's position, rotation and scale.
Parameters
matrix
Returns
void
Inherited from
applyQuaternion()
applyQuaternion(
quaternion):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:415
Applies the rotation represented by the quaternion to the object.
Parameters
quaternion
Returns
this
Inherited from
attach()
attach(
object):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:565
Adds a Object3D as a child of this, while maintaining the object's world transform.
Parameters
object
Returns
this
Remarks
Note: This method does not support scene graphs having non-uniformly-scaled nodes(s).
See
Inherited from
clear()
clear():
this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:557
Removes all child objects.
Returns
this
Inherited from
clone()
clone(
recursive?):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:692
Returns a clone of this object and optionally all descendants.
Parameters
recursive?
boolean
If true, descendants of the object are also cloned. Default true
Returns
this
Inherited from
computeLineDistances()
computeLineDistances():
this
Defined in: node_modules/@types/three/src/objects/Line.d.ts:79
Computes an array of distance values which are necessary for LineDashedMaterial
Returns
this
Remarks
For each vertex in the geometry, the method calculates the cumulative length from the current point to the very beginning of the line.
copy()
copy(
object,recursive?):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:701
Copies the given object into this object.
Parameters
object
recursive?
boolean
If set to true, descendants of the object are copied next to the existing ones. If set to
false, descendants are left unchanged. Default is true.
Returns
this
Remarks
Event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
Inherited from
dispatchEvent()
dispatchEvent<
T>(event):void
Defined in: node_modules/@types/three/src/core/EventDispatcher.d.ts:81
Fire an event type.
Type Parameters
T
T extends string
Parameters
event
BaseEvent<T> & TEventMap[T]
The event that gets fired.
Returns
void
Inherited from
getObjectById()
getObjectById(
id):Object3D<Object3DEventMap>
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:573
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Parameters
id
number
Unique number of the object instance. Expects a Integer
Returns
Remarks
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
See
Inherited from
getObjectByName()
getObjectByName(
name):Object3D<Object3DEventMap>
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:581
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
Parameters
name
string
String to match to the children's Object3D.name property.
Returns
Remarks
Note that for most objects the name is an empty string by default You will have to set it manually to make use of this method.
Inherited from
getObjectByProperty()
getObjectByProperty(
name,value):Object3D<Object3DEventMap>
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:590
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
Parameters
name
string
the property name to search for.
value
any
value of the given property.
Returns
Inherited from
getObjectsByProperty()
getObjectsByProperty(
name,value,optionalTarget?):Object3D<Object3DEventMap>[]
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:600
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
Parameters
name
string
The property name to search for.
value
any
Value of the given property.
optionalTarget?
target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
Returns
Inherited from
getWorldDirection()
getWorldDirection(
target):Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:624
Returns a vector representing the direction of object's positive z-axis in world space.
Parameters
target
The result will be copied into this Vector3.
Returns
Inherited from
getWorldPosition()
getWorldPosition(
target):Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:606
Returns a vector representing the position of the object in world space.
Parameters
target
The result will be copied into this Vector3.
Returns
Inherited from
getWorldQuaternion()
getWorldQuaternion(
target):Quaternion
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:612
Returns a quaternion representing the rotation of the object in world space.
Parameters
target
The result will be copied into this Quaternion.
Returns
Inherited from
getWorldScale()
getWorldScale(
target):Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:618
Returns a vector of the scaling factors applied to the object for each axis in world space.
Parameters
target
The result will be copied into this Vector3.
Returns
Inherited from
hasEventListener()
hasEventListener<
T>(type,listener):boolean
Defined in: node_modules/@types/three/src/core/EventDispatcher.d.ts:62
Checks if listener is added to an event type.
Type Parameters
T
T extends string
Parameters
type
T
The type of event to listen to.
listener
EventListener<TEventMap[T], T, Line<TGeometry, TMaterial, TEventMap>>
The function that gets called when the event is fired.
Returns
boolean
Inherited from
localToWorld()
localToWorld(
vector):Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:508
Converts the vector from this object's local space to world space.
Parameters
vector
A vector representing a position in this object's local space.
Returns
Inherited from
lookAt()
Call Signature
lookAt(
vector):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:521
Rotates the object to face a point in world space.
Parameters
vector
A vector representing a position in world space to look at.
Returns
void
Remarks
This method does not support objects having non-uniformly-scaled parent(s).
Inherited from
Call Signature
lookAt(
x,y,z):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:529
Rotates the object to face a point in world space.
Parameters
x
number
Expects a Float
y
number
Expects a Float
z
number
Expects a Float
Returns
void
Remarks
This method does not support objects having non-uniformly-scaled parent(s).
Inherited from
onAfterRender()
onAfterRender(
renderer,scene,camera,geometry,material,group):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:377
An optional callback that is executed immediately after a 3D object is rendered.
Parameters
renderer
scene
camera
geometry
material
group
Returns
void
Remarks
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
Please notice that this callback is only executed for renderable 3D objects. Meaning 3D objects which
define their visual appearance with geometries and materials like instances of Mesh, Line,
Points or Sprite. Instances of Object3D, Group or Bone are not renderable
and thus this callback is not executed for such objects.
Inherited from
onAfterShadow()
onAfterShadow(
renderer,scene,camera,shadowCamera,geometry,depthMaterial,group):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:342
An optional callback that is executed immediately after a 3D object is rendered to a shadow map.
Parameters
renderer
scene
camera
shadowCamera
geometry
depthMaterial
group
Returns
void
Remarks
This function is called with the following parameters: renderer, scene, camera, shadowCamera, geometry,
depthMaterial, group.
Please notice that this callback is only executed for renderable 3D objects. Meaning 3D objects which
define their visual appearance with geometries and materials like instances of Mesh, Line,
Points or Sprite. Instances of Object3D, Group or Bone are not renderable
and thus this callback is not executed for such objects.
Inherited from
onBeforeRender()
onBeforeRender(
renderer,scene,camera,geometry,material,group):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:360
An optional callback that is executed immediately before a 3D object is rendered.
Parameters
renderer
scene
camera
geometry
material
group
Returns
void
Remarks
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
Please notice that this callback is only executed for renderable 3D objects. Meaning 3D objects which
define their visual appearance with geometries and materials like instances of Mesh, Line,
Points or Sprite. Instances of Object3D, Group or Bone are not renderable
and thus this callback is not executed for such objects.
Inherited from
onBeforeShadow()
onBeforeShadow(
renderer,scene,camera,shadowCamera,geometry,depthMaterial,group):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:323
An optional callback that is executed immediately before a 3D object is rendered to a shadow map.
Parameters
renderer
scene
camera
shadowCamera
geometry
depthMaterial
group
Returns
void
Remarks
This function is called with the following parameters: renderer, scene, camera, shadowCamera, geometry,
depthMaterial, group.
Please notice that this callback is only executed for renderable 3D objects. Meaning 3D objects which
define their visual appearance with geometries and materials like instances of Mesh, Line,
Points or Sprite. Instances of Object3D, Group or Bone are not renderable
and thus this callback is not executed for such objects.
Inherited from
raycast()
raycast(
raycaster,intersects):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:634
Abstract (empty) method to get intersections between a casted ray and this object
Parameters
raycaster
intersects
Intersection<Object3D<Object3DEventMap>>[]
Returns
void
Remarks
Subclasses such as Mesh, Line, and Points implement this method in order to use raycasting.
See
Default Value
() => {}
Inherited from
remove()
remove(...
object):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:547
Removes a Object3D as child of this Object3D.
Parameters
object
...Object3D<Object3DEventMap>[]
Returns
this
Remarks
An arbitrary number of objects may be removed.
See
Group for info on manually grouping objects.
Inherited from
removeEventListener()
removeEventListener<
T>(type,listener):void
Defined in: node_modules/@types/three/src/core/EventDispatcher.d.ts:72
Removes a listener from an event type.
Type Parameters
T
T extends string
Parameters
type
T
The type of the listener that gets removed.
listener
EventListener<TEventMap[T], T, Line<TGeometry, TMaterial, TEventMap>>
The listener function that gets removed.
Returns
void
Inherited from
removeFromParent()
removeFromParent():
this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:552
Removes this object from its current parent.
Returns
this
Inherited from
rotateOnAxis()
rotateOnAxis(
axis,angle):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:449
Rotate an object along an axis in object space.
Parameters
axis
A normalized vector in object space.
angle
number
The angle in radians. Expects a Float
Returns
this
Remarks
The axis is assumed to be normalized.
Inherited from
rotateOnWorldAxis()
rotateOnWorldAxis(
axis,angle):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:458
Rotate an object along an axis in world space.
Parameters
axis
A normalized vector in world space.
angle
number
The angle in radians. Expects a Float
Returns
this
Remarks
The axis is assumed to be normalized Method Assumes no rotated parent.
Inherited from
rotateX()
rotateX(
angle):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:464
Rotates the object around x axis in local space.
Parameters
angle
number
Returns
this
Inherited from
rotateY()
rotateY(
angle):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:470
Rotates the object around y axis in local space.
Parameters
angle
number
Returns
this
Inherited from
rotateZ()
rotateZ(
angle):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:476
Rotates the object around z axis in local space.
Parameters
angle
number
Returns
this
Inherited from
setRotationFromAxisAngle()
setRotationFromAxisAngle(
axis,angle):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:422
Calls setFromAxisAngle(axis, angle) on the .quaternion.
Parameters
axis
A normalized vector in object space.
angle
number
Angle in radians. Expects a Float
Returns
void
Inherited from
Object3D.setRotationFromAxisAngle
setRotationFromEuler()
setRotationFromEuler(
euler):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:428
Calls setFromEuler(euler) on the .quaternion.
Parameters
euler
Euler angle specifying rotation amount.
Returns
void
Inherited from
setRotationFromMatrix()
setRotationFromMatrix(
m):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:435
Calls setFromRotationMatrix(m) on the .quaternion.
Parameters
m
Rotate the quaternion by the rotation component of the matrix.
Returns
void
Remarks
Note that this assumes that the upper 3x3 of m is a pure rotation matrix (i.e, unscaled).
Inherited from
Object3D.setRotationFromMatrix
setRotationFromQuaternion()
setRotationFromQuaternion(
q):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:441
Copy the given Quaternion into .quaternion.
Parameters
q
Normalized Quaternion.
Returns
void
Inherited from
Object3D.setRotationFromQuaternion
toJSON()
toJSON(
meta?):Object3DJSON
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:686
Convert the object to three.js JSON Object/Scene format.
Parameters
meta?
Object containing metadata such as materials, textures or images for the object.
Returns
Inherited from
translateOnAxis()
translateOnAxis(
axis,distance):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:484
Translate an object by distance along an axis in object space
Parameters
axis
A normalized vector in object space.
distance
number
The distance to translate. Expects a Float
Returns
this
Remarks
The axis is assumed to be normalized.
Inherited from
translateX()
translateX(
distance):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:490
Translates object along x axis in object space by distance units.
Parameters
distance
number
Expects a Float
Returns
this
Inherited from
translateY()
translateY(
distance):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:496
Translates object along y axis in object space by distance units.
Parameters
distance
number
Expects a Float
Returns
this
Inherited from
translateZ()
translateZ(
distance):this
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:502
Translates object along z axis in object space by distance units.
Parameters
distance
number
Expects a Float
Returns
this
Inherited from
traverse()
traverse(
callback):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:641
Executes the callback on this object and all descendants.
Parameters
callback
(object) => any
A function with as first argument an Object3D object.
Returns
void
Remarks
Note: Modifying the scene graph inside the callback is discouraged.
Inherited from
traverseAncestors()
traverseAncestors(
callback):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:656
Executes the callback on all ancestors.
Parameters
callback
(object) => any
A function with as first argument an Object3D object.
Returns
void
Remarks
Note: Modifying the scene graph inside the callback is discouraged.
Inherited from
traverseVisible()
traverseVisible(
callback):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:649
Like traverse, but the callback will only be executed for visible objects
Parameters
callback
(object) => any
A function with as first argument an Object3D object.
Returns
void
Remarks
Descendants of invisible objects are not traversed. Note: Modifying the scene graph inside the callback is discouraged.
Inherited from
updateMatrix()
updateMatrix():
void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:661
Updates local transform.
Returns
void
Inherited from
updateMatrixWorld()
updateMatrixWorld(
force?):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:669
Updates the global transform of the object.
And will update the object descendants if .matrixWorldNeedsUpdate is set to true or if the force parameter is set to true.
Parameters
force?
boolean
A boolean that can be used to bypass .matrixWorldAutoUpdate, to recalculate the world matrix of the object and descendants on the current frame.
Useful if you cannot wait for the renderer to update it on the next frame, assuming .matrixWorldAutoUpdate set to true.
Returns
void
Inherited from
updateMorphTargets()
updateMorphTargets():
void
Defined in: node_modules/@types/three/src/objects/Line.d.ts:86
Updates the morphTargets to have no influence on the object
Returns
void
Remarks
Resets the .morphTargetInfluences and .morphTargetDictionary properties.
updateWorldMatrix()
updateWorldMatrix(
updateParents?,updateChildren?,force?):void
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:680
An alternative version of Object3D#updateMatrixWorld with more control over the update of ancestor and descendant nodes.
Parameters
updateParents?
boolean
Whether ancestor nodes should be updated or not.
updateChildren?
boolean
Whether descendant nodes should be updated or not.
force?
boolean
When set to true, a recomputation of world matrices is forced even
when Object3D#matrixWorldNeedsUpdate is false.
Returns
void
Inherited from
worldToLocal()
worldToLocal(
vector):Vector3
Defined in: node_modules/@types/three/src/core/Object3D.d.ts:514
Converts the vector from world space to this object's local space.
Parameters
vector
A vector representing a position in world space.