parseMaterials method

dynamic parseMaterials(
  1. dynamic textureMap
)

Implementation

parseMaterials(textureMap) {
  var materialMap = {};

  if (fbxTree.objects["Material"] != null) {
    var materialNodes = fbxTree.objects["Material"];

    for (var nodeID in materialNodes.keys) {
      var material = parseMaterial(materialNodes[nodeID], textureMap);

      if (material != null) materialMap[parseInt(nodeID)] = material;
    }
  }

  return materialMap;
}