Change the element colors by given element names.
Signature:
setElementsColor(elementNames: Array<string>, color: Array<number>): void;
Parameter | Description |
---|---|
elementNames | An array of element names. |
color | An RGB color, e.g., [1, 1, 1]. It has an optional transparency in the 4th element of color. But we can only set the transparency of tranparent elements. e.g. [1, 0, 0, 0.5]. |
Returns:
void
Element names are special identifier used in Modelo API. We don't encourage users to manually create element names or to decipher the meaning of the name strings. The element names are returned when calling Viewer3DBase.getSelectedElements()