ValueMeshColor

require(["esri/geometry/support/ValueMeshColor"], function(ValueMeshColor) { /* code goes here */ });
Class: esri/geometry/support/ValueMeshColor
Inheritance: ValueMeshColor Accessor
Since: ArcGIS API for JavaScript 4.7

ValueMeshColor is a type of mesh color that represents a single uniform color to be applied to a mesh component. ValueMeshColor instances can be used with the MeshComponent.material.color property.

var meshColor = new ValueMeshColor({
  color: "red"
});

var mesh = Mesh.createBox(location, {
  material: {
    color: meshColor
  }
});

// Mesh colors support autocasting within a mesh material constructor
var mesh2 = Mesh.createSphere(location, {
  material: {
    color: {
      type: "value",
      value: "green"
    }
  }
});
See also:

Constructors

new ValueMeshColor(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
String

For ValueMeshColor the type is always value.

more details
more detailsValueMeshColor
Color

The color value.

more details
more detailsValueMeshColor

Property Details

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

typeStringreadonly

For ValueMeshColor the type is always value.

Autocasts from Number[]|String|Object

The color value.

Method Overview

NameReturn TypeSummaryClass
ValueMeshColor

Creates a deep clone.

more details
more detailsValueMeshColor

Method Details

Creates a deep clone.

Returns:
TypeDescription
ValueMeshColorA deep clone of the object that invoked this method.

API Reference search results

NameTypeModule
Loading...