NonUniformColor Class

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

@note A NonUniformColor table cannot contain a mix of opaque and translucent colors. If any color in 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 indices.  
indices Readonly Uint16Array For each vertex, an index into colors indicating the color of that vertex.  
isOpaque Readonly boolean If true, indicates none of the colors have a transparency greater than zero; otherwise, all of  

Defined in

Last Updated: 17 December, 2024