loadSkin method

dynamic loadSkin(
  1. dynamic skinIndex
)

Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins @param {number} skinIndex @return {Promise

Implementation

loadSkin(skinIndex) async {
  var skinDef = this.json["skins"][skinIndex];

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

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

  var accessor =
      await this.getDependency('accessor', skinDef["inverseBindMatrices"]);

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