ColorGeometryInstanceAttribute

external class ColorGeometryInstanceAttribute(red: Double? = definedExternally, green: Double? = definedExternally, blue: Double? = definedExternally, alpha: Double? = definedExternally)(source)

Value and type information for per-instance geometry color.

const instance = new GeometryInstance({
geometry : BoxGeometry.fromDimensions({
dimensions : new Cartesian3(1000000.0, 1000000.0, 500000.0)
}),
modelMatrix : Matrix4.multiplyByTranslation(Transforms.eastNorthUpToFixedFrame(
Cartesian3.fromDegrees(0.0, 0.0)), new Cartesian3(0.0, 0.0, 1000000.0), new Matrix4()),
id : 'box',
attributes : {
color : new ColorGeometryInstanceAttribute(red, green, blue, alpha)
}
});

Parameters

red

The red component. Default value - 1.0

green

The green component. Default value - 1.0

blue

The blue component. Default value - 1.0

alpha

The alpha component. Default value - 1.0

See also

Constructors

Link copied to clipboard
constructor(red: Double? = definedExternally, green: Double? = definedExternally, blue: Double? = definedExternally, alpha: Double? = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The datatype of each component in the attribute, e.g., individual elements in ColorGeometryInstanceAttribute.value.

Link copied to clipboard

The number of components in the attributes, i.e., ColorGeometryInstanceAttribute.value.

Link copied to clipboard

When true and componentDatatype is an integer format, indicate that the components should be mapped to the range 0, 1 (unsigned) or -1, 1 (signed) when they are accessed as floating-point for rendering.

Link copied to clipboard

The values for the attributes stored in a typed array.