color( )
Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.
color() : number[];
Gets the current color value of the node, in the form [r, g, b, a]
. Each component is a number between 0 and 1.
The final component, alpha, is the opacity of the object, where 0 is fully transparent and 1 is fully opaque.
Default value: [1, 1, 1, 1]
Returns
Section titled “Returns”The color of the node.
Example
Section titled “Example”var c = myobject.color();// c is [1, 1, 1, 1]