Scene3D.setElementsColor() method

Change the element colors by given element names.

Signature:

setElementsColor(elementNames: Array<string>, color: Array<number>): void;

Parameters

ParameterDescription
elementNamesAn array of element names.
colorAn 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

Remarks

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()