Skip to content
On this page

MeshBasicMaterial

A material for drawing geometries in a simple shaded (flat or wireframe) way.

This material is not affected by lights.

Example

Code

Note: The following code is updated according to the properties set above.

Props

Prop nameDescriptionTypeDefault
color Color of the material.union
side Defines which side of faces will be rendered - front, back or both. Represtented by THREE.Side.SideFrontSide
name Name of the materialstring""
opacity Float in the range of 0.0 - 1.0 indicating how transparent the material is.number1
transparent Defines whether this material is transparent.booleanfalse
vertexColorsDefines whether vertex coloring is used.booleanfalse

Slots

NameDescriptionBindings
default

Expose

three

You can access the managed THREE.MeshBasicMaterial instance using the exposed three property.

Example code

template
<MeshBasicMaterial ref="material" />
ts
const material = ref(null);

onMounted(() => {
  // Do something with the THREE.MeshBasicMaterial instance
  const threeMaterial = material.value.three;
});

Released under the MIT License.