toValue
Converts a color to a typed array that can be used to assign a color attribute.
const attributes = primitive.getGeometryInstanceAttributes('an id');
attributes.color = ColorGeometryInstanceAttribute.toValue(Color.AQUA, attributes.color);
Content copied to clipboard
Return
The modified result parameter or a new instance if result was undefined.
Parameters
color
The color.
result
The array to store the result in, if undefined a new instance will be created.