function loadNodes(loader, frameState) {
  const nodeJsons = loader.gltfJson.nodes;
  if (!defined(nodeJsons)) {
    return [];
  }

  const loadedNodes = nodeJsons.map(function (nodeJson, i) {
    const node = loadNode(loader, nodeJson, frameState);
    node.index = i;
    return node;
  });

  for (let i = 0; i < loadedNodes.length; ++i) {
    const childrenNodeIds = nodeJsons[i].children;
    if (defined(childrenNodeIds)) {
      for (let j = 0; j < childrenNodeIds.length; ++j) {
        loadedNodes[i].children.push(loadedNodes[childrenNodeIds[j]]);
      }
    }
  }

  return loadedNodes;
}
Load resources associated with the nodes in a glTF JSON
@param {GltfLoader} loader
@param {FrameState} frameState
@returns {ModelComponents.Node[]}
@private