fromJson method
Implementation
Skeleton fromJson(Map<String,dynamic> json, Map<String,Bone?> bones) {
uuid = json['uuid'];
for (int i = 0, l = json['bones'].length; i < l; i++) {
final uuid = json['bones'][i];
Bone? bone = bones[uuid];
if (bone == null) {
console.warning('Skeleton: No bone found with UUID: $uuid');
bone = Bone();
}
this.bones.add(bone);
boneInverses.add(Matrix4.identity()..copyFromArray(json['boneInverses'][i]));
}
init();
return this;
}