[page:Object3D] →

# [name]

Class representing triangular [link:https://en.wikipedia.org/wiki/Polygon_mesh polygon mesh] based objects. Also serves as a base for other classes such as [page:SkinnedMesh].

## Example

`var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 ); var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh );`

## Constructor

### [name]( [param:Geometry geometry], [param:Material material] )

[page:Geometry geometry] — (optional) an instance of [page:Geometry] or [page:BufferGeometry]. Default is a new [page:BufferGeometry].
[page:Material material] — (optional) a single or an array of [page:Material]. Default is a new [page:MeshBasicMaterial]

## Properties

See the base [page:Object3D] class for common properties.

### [property:Integer drawMode]

Determines how the mesh triangles are constructed from the vertices. See the draw mode [page:DrawModes constants] for all possible values. Default is [page:DrawModes TrianglesDrawMode].

A sensible usage of this property is only possible when [page:Mesh.geometry] is of type [page:BufferGeometry BufferGeometry] since the engine always assumes *THREE.TrianglesDrawMode* for [page:Geometry Geometry].

### [property:Boolean isMesh]

Used to check whether this or derived classes are meshes. Default is *true*.
You should not change this, as it is used internally for optimisation.

### [property:Geometry geometry]

An instance of [page:Geometry] or [page:BufferGeometry] (or derived classes), defining the object's structure.
It's recommended to always use a [page:BufferGeometry] if possible for best performance.

### [property:Material material]

An instance of material derived from the [page:Material] base class or an array of materials, defining the object's appearance. Default is a [page:MeshBasicMaterial] with a random color.

### [property:Array morphTargetInfluences]

An array of weights typically from 0-1 that specify how much of the morph is applied. Undefined by default, but reset to a blank array by [page:Mesh.updateMorphTargets updateMorphTargets].

### [property:Object morphTargetDictionary]

A dictionary of morphTargets based on the morphTarget.name property. Undefined by default, but rebuilt [page:Mesh.updateMorphTargets updateMorphTargets].

## Methods

See the base [page:Object3D] class for common methods.

### [method:null setDrawMode]( [param:Integer value] )

Set the value of [page:.drawMode drawMode].

### [method:Mesh clone]()

Returns a clone of this [name] object and its descendants.

### [method:null raycast]( [param:Raycaster raycaster], [param:Array intersects] )

Get intersections between a casted ray and this mesh. [page:Raycaster.intersectObject] will call this method, but the results are not ordered.

### [method:null updateMorphTargets]()

Updates the morphTargets to have no influence on the object. Resets the [page:Mesh.morphTargetInfluences morphTargetInfluences] and [page:Mesh.morphTargetDictionary morphTargetDictionary] properties.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]