loadSkin method

dynamic loadSkin(
  1. dynamic skinIndex
)

Implementation

loadSkin(skinIndex) async {
  final skinDef = json["skins"][skinIndex];

  final skinEntry = {"joints": skinDef["joints"]};

  if (skinDef["inverseBindMatrices"] == null) {
    return skinEntry;
  }

  final accessor = await getDependency('accessor', skinDef["inverseBindMatrices"]);

  skinEntry["inverseBindMatrices"] = accessor;
  return skinEntry;
}