Class: ColorRGBA

X3D: 3.3
Component: Rendering
Status:
fully implemented

x3dom.nodeTypes. ColorRGBA

This node defines a set of RGBA colours to be used in the fields of another node. RGBA color nodes are only used to specify multiple colours with alpha for a single geometric shape, such as colours for the faces or vertices of an IndexedFaceSet. A Material node is used to specify the overall material parameters of lit geometry. If both a Material node and a ColorRGBA node are specified for a geometric shape, the colours shall replace the diffuse and transparency components of the material. RGB or RGBA textures take precedence over colours; specifying both an RGB or RGBA texture and a ColorRGBA node for geometric shape will result in the ColorRGBA node being ignored.

HTML Encoding and Default Values

<ColorRGBA color='[]' metadata='X3DMetadataObject' ></ColorRGBA>

Inheritance


Constructor

ColorRGBA(ctx)

Constructor for ColorRGBA

Parameters:
Name Type Argument Default Description
ctx Object <optional>
null context object, containing initial settings like namespace

Fields

These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
color MFColorRGBA [] [0, 1] The set of RGBA colors
metadata SFNode X3DMetadataObject X3DColorNode Field to add metadata information