parseUVs method

dynamic parseUVs(
  1. Map uvNode
)

Implementation

parseUVs(Map uvNode) {
  var mappingType = uvNode["MappingInformationType"];
  var referenceType = uvNode["ReferenceInformationType"];
  var buffer = uvNode["UV"]["a"];
  var indexBuffer = [];
  if (referenceType == 'IndexToDirect') {
    indexBuffer = uvNode["UVIndex"]["a"];
  }

  return {
    "dataSize": 2,
    "buffer": buffer,
    "indices": indexBuffer,
    "mappingType": mappingType,
    "referenceType": referenceType
  };
}