fromUnknown static method

BufferAttribute<TypedDataList> fromUnknown(
  1. TypedData arrayList,
  2. int itemSize, [
  3. bool normalized = false
])

Implementation

static BufferAttribute fromUnknown(TypedData arrayList, int itemSize, [bool normalized = false]){
  if(arrayList is Int8List){
    return Int8BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Uint8List){
    return Uint8BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Int16List){
    return Int16BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Uint16List){
    return Uint16BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Int32List){
    return Int32BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Uint32List){
    return Uint32BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Float32List){
    return Float16BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Float32List){
    return Float32BufferAttribute(arrayList,itemSize,normalized);
  }
  else if(arrayList is Float64List){
    return Float64BufferAttribute(arrayList,itemSize,normalized);
  }
  else{
    throw('Unresolved Array type');
  }
}