copySkinnable method

void copySkinnable(
  1. ActorSkinnable node,
  2. ActorArtboard resetArtboard
)

Implementation

void copySkinnable(ActorSkinnable node, ActorArtboard resetArtboard) {
  if (node._connectedBones != null) {
    _connectedBones = <SkinnedBone>[];
    for (int i = 0; i < node._connectedBones!.length; i++) {
      SkinnedBone from = node._connectedBones![i];
      SkinnedBone bc = SkinnedBone(from.boneIdx);
      Mat2D.copy(bc.bind, from.bind);
      Mat2D.copy(bc.inverseBind, from.inverseBind);
      _connectedBones!.add(bc);
    }
  }
}