Capítulo 9 de 859
Class representing triangular polygon mesh based objects.
[0,1] that specify how much of the morph is applied. This member is undefined by default and…const geometry = new THREE.BoxGeometry( 1, 1, 1 );
const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
const mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
Constructor
| Signature |
|---|
| `new Mesh( geometry : BufferGeometry, material : Material |
Properties
| Property | Description |
|---|---|
.count : number | The number of instances of this mesh. Can only be used with WebGPURenderer. |
.geometry : BufferGeometry | The mesh geometry. |
.isMesh : 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 |
|---|---|
.getVertexPosition( index : number, target : Vector3 ) : Vector3 | Returns the local-space position of the vertex at the given index, taking into account the current animation state of both morph targets and skinning. |
.raycast( raycaster : Raycaster, intersects : Array.<Object> ) | Computes intersection points between a casted ray and this line. |
.updateMorphTargets() | Sets the values of Mesh#morphTargetDictionary and Mesh#morphTargetInfluences to make sure existing morph targets can influence th… |