Capítulo 5 de 859
A continuous line. The line are rendered by connecting consecutive vertices with straight lines.
[0,1] that specify how much of the morph is applied. This member is undefined by default and…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 line = new THREE.Line( geometry, material );
scene.add( line );
Constructor
| Signature |
|---|
| `new Line( geometry : BufferGeometry, material : Material |
Properties
| Property | Description |
|---|---|
.geometry : BufferGeometry | The line geometry. |
.isLine : boolean (readonly) | This flag can be used for type testing. |
| `.material : Material | Array.<Material>` |
| `.morphTargetDictionary : Object.<string, number> | undefined` |
| `.morphTargetInfluences : Array.<number> | undefined` |
Methods
| Method | Description |
|---|---|
.computeLineDistances() : Line | Computes an array of distance values which are necessary for rendering dashed lines. For each vertex in the geometry, the method calculates the cumulative length from the current point to the very be… |
.raycast( raycaster : Raycaster, intersects : Array.<Object> ) | Computes intersection points between a casted ray and this line. |
.updateMorphTargets() | Sets the values of Line#morphTargetDictionary and Line#morphTargetInfluences to make sure existing morph targets can influence th… |