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 Objectoptional
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.
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
String | For ValueMeshColor the type is always | more details | ValueMeshColor | |
Color | The color value. more details | more details | ValueMeshColor |
Property Details
- 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
.
The color value.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
ValueMeshColor | Creates a deep clone. more details | more details | ValueMeshColor |
Method Details
- clone(){ValueMeshColor}
Creates a deep clone.
Returns:Type Description ValueMeshColor A deep clone of the object that invoked this method.
Loading...