getTypedAttribute function

BufferAttribute<NativeArray<num>> getTypedAttribute(
  1. NativeArray<num> array,
  2. int itemSize, [
  3. bool normalized = false
])

Implementation

BufferAttribute getTypedAttribute(NativeArray array, int itemSize, [bool normalized = false]) {
  if (array is Uint32Array) {
    return Uint32BufferAttribute(array, itemSize, normalized);
  } else if (array is Uint16Array) {
    return Uint16BufferAttribute(array, itemSize, normalized);
  } else if (array is Float32Array) {
    return Float32BufferAttribute(array, itemSize, normalized);
  } else {
    throw (" Util.dart getTypedArray type: $array is not support ");
  }
}