bind method

void bind(
  1. Skeleton skeleton, [
  2. Matrix4? bindMatrix
])

Implementation

void bind(Skeleton skeleton, [Matrix4? bindMatrix]) {
  this.skeleton = skeleton;

  if (bindMatrix == null) {
    updateMatrixWorld(true);

    this.skeleton!.calculateInverses();

    bindMatrix = matrixWorld;
  }

  this.bindMatrix!.copy(bindMatrix);
  bindMatrixInverse.copy(bindMatrix!).invert();
}