ComponentDatatype
Enumerations for WebGL component datatypes. Components are intrinsics, which form attributes, which form vertices.
Source:
Members
- 
    <static, constant> BYTE :Enumeration
- 
    
    8-bit signed byte enumeration corresponding togl.BYTEand the type of an element inInt8Array.- Default Value:
- 0x1400
 
 
- 
    <static, constant> DOUBLE :Enumeration
- 
    
    64-bit floating-point enumeration corresponding togl.DOUBLE(in Desktop OpenGL; this is not supported in WebGL, and is emulated in Cesium via GeometryPipeline.encodeAttribute) and the type of an element inFloat64Array.- Default Value:
- 0x140A
 
 
- 
    <static, constant> FLOAT :Enumeration
- 
    
    32-bit floating-point enumeration corresponding toFLOATand the type of an element inFloat32Array.- Default Value:
- 0x1406
 
 
- 
    <static, constant> SHORT :Enumeration
- 
    
    16-bit signed short enumeration corresponding toSHORTand the type of an element inInt16Array.- Default Value:
- 0x1402
 
 
- 
    <static, constant> UNSIGNED_BYTE :Enumeration
- 
    
    8-bit unsigned byte enumeration corresponding toUNSIGNED_BYTEand the type of an element inUint8Array.- Default Value:
- 0x1401
 
 
- 
    <static, constant> UNSIGNED_SHORT :Enumeration
- 
    
    16-bit unsigned short enumeration corresponding toUNSIGNED_SHORTand the type of an element inUint16Array.- Default Value:
- 0x1403
 
 
Methods
- 
    <static> createArrayBufferView
- 
    
    
    Creates a typed view of an array of bytes. Parameters:Name Type Argument Description componentDatatypeComponentDatatype The type of the view to create. bufferArrayBuffer The buffer storage to use for the view. byteOffsetNumber <optional> 
 The offset, in bytes, to the first element in the view. lengthNumber <optional> 
 The number of elements in the view. Throws:DeveloperError : componentDatatype is not a valid enumeration value.Returns:Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array A typed array view of the buffer.
- 
    <static> createTypedArray
- 
    
    
    Creates a typed array corresponding to component data type. Parameters:Name Type Description componentDatatypeComponentDatatype The component data type. valuesOrLengthNumber | Array The length of the array to create or an array. Throws:DeveloperError : componentDatatype is not a valid enumeration value.Returns:Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array A typed array.Example// creates a Float32Array with length of 100 var typedArray = Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT, 100); 
- 
    <static> fromTypedArray
- 
    
    
    Gets the ComponentDatatype for the provided TypedArray instance. Parameters:Name Type Description arrayTypedArray The typed array. Returns:ComponentDatatype The ComponentDatatype for the provided array, or undefined if the array is not a TypedArray.
- 
    <static> fromValue
- 
    
    
    Gets the ComponentDatatype for the provided value. Parameters:Name Type Description valueNumber The value. Returns:ComponentDatatype The ComponentDatatype for the provided value, or undefined if no enumeration with the provided value exists.
- 
    <static> validate
- 
    
    
    Validates that the provided component datatype is a valid ComponentDatatype Parameters:Name Type Description componentDatatypeComponentDatatype The component datatype to validate. Returns:Booleantrueif the provided component datatype is a valid enumeration value; otherwise,false.Exampleif (!Cesium.ComponentDatatype.validate(componentDatatype)) { throw new Cesium.DeveloperError('componentDatatype must be a valid enumeration value.'); }
