NonUniformColor Class

As part of a ColorIndex, describes per-vertex colors for a MeshArgs or PolylineArgs. The NonUniformColor.colors array holds the set of unique colors. The NonUniformColor.indices array describes the color of each vertex as an index into NonUniformColor.colors.

@note A NonUniformColor table cannot contain a mix of opaque and translucent colors. If any color in NonUniformColor.colors has a transparency greater than zero, all of them must have a transparency greater than zero.

Methods

Name Description
constructor(colors: Uint32Array, indices: number[], hasAlpha: boolean): NonUniformColor Constructor.  

Properties

Name Type Description
colors Readonly Uint32Array An array of 32-bit ColorDef values in tbgr format, indexed by NonUniformColor.indices.  
indices Readonly Uint16Array For each vertex, an index into NonUniformColor.colors indicating the color of that vertex.  
isOpaque Readonly boolean If true, indicates none of the NonUniformColor.colors have a transparency greater than zero; otherwise, all of  

Defined in

Last Updated: 25 April, 2024