ComponentDatatype

ComponentDatatype

Enumerations for WebGL component datatypes. Components are intrinsics, which form attributes, which form vertices.

Source:

Members

<static, constant> :Enumeration

8-bit signed byte enumeration corresponding to gl.BYTE and the type of an element in Int8Array.
Default Value:
  • 0x1400

<static, constant> :Enumeration

64-bit floating-point enumeration corresponding to gl.DOUBLE (in Desktop OpenGL; this is not supported in WebGL, and is emulated in Cesium via GeometryPipeline.encodeAttribute) and the type of an element in Float64Array.
Default Value:
  • 0x140A

<static, constant> :Enumeration

32-bit floating-point enumeration corresponding to FLOAT and the type of an element in Float32Array.
Default Value:
  • 0x1406

<static, constant> :Enumeration

16-bit signed short enumeration corresponding to SHORT and the type of an element in Int16Array.
Default Value:
  • 0x1402

<static, constant> :Enumeration

8-bit unsigned byte enumeration corresponding to UNSIGNED_BYTE and the type of an element in Uint8Array.
Default Value:
  • 0x1401

<static, constant> :Enumeration

32-bit unsigned int enumeration corresponding to UNSIGNED_INT and the type of an element in Uint32Array.

<static, constant> :Enumeration

16-bit unsigned short enumeration corresponding to UNSIGNED_SHORT and the type of an element in Uint16Array.
Default Value:
  • 0x1403

Methods

<static>

Validates that the provided component datatype is a valid ComponentDatatype

Parameters:
Name Type Description
componentDatatype ComponentDatatype The component datatype to validate.
Returns:
Boolean true if the provided component datatype is a valid enumeration value; otherwise, false.
Example
if (!ComponentDatatype.validate(componentDatatype)) {
  throw new DeveloperError('componentDatatype must be a valid enumeration value.');
}