Skip to content
On this page

Mesh

A component representing triangular mesh. Each triangle in the mesh is defined by three vertices, which are connected by edges to form the surface of the object.

Mesh is composed of a geometry, which defines the shape of the object, and a material, which defines the appearance of the object.

Example

Code

template
<Mesh>
  <!-- Use any supported mesh material -->
  <MeshBasicMaterial color="red" />
  <!-- Use any supported geometry -->
  <BoxGeometry />
</Mesh>

Props

Prop nameDescriptionTypeDefault
castShadow Whether the object gets rendered into shadow map.booleanfalse
geometry Optional name of the geometry.
This allows reusing of the geometry.
unionnull
material Optional name of the material.
This allows reusing of the material.
unionnull
name Name of the Mesh.string""
position A Vector3Like representing the object's local position.Vector3Like[0, 0, 0]
receiveShadowWhether the material receives shadows.booleanfalse
rotation A Vector3Like representing local rotation (see Euler angles), in radians.Vector3Like[0, 0, 0]
scale A Vector3Like representing the object's local scale.Vector3Like[1, 1, 1]

Slots

NameDescriptionBindings
default

Expose

three


Released under the MIT License.