Theme:

Mesh

A triangular polygon mesh. Combines a BufferGeometry with a Material.

Extends Object3D.

Constructor

const mesh = new Mesh(geometry?, material?)
// defaults: new BufferGeometry(), new MeshStandardMaterial()

Properties

  • isMesh — Type flag (true)
  • geometry — BufferGeometry
  • material — Material or Array<Material>
  • morphTargetDictionary{name: index} map (set automatically if geometry has morph targets)
  • morphTargetInfluences — Array of weights [0-1] for morph targets
  • count — Instance count (for WebGPU instancing, default 1)

Methods

  • updateMorphTargets() — Detect and setup morph targets from geometry
  • getVertexPosition(index, target) — Get vertex position accounting for morph targets
  • raycast(raycaster, intersects) — Ray intersection test
  • copy(source, recursive?) — Copy mesh data