update method
void
update()
Updates the boneMatrices and boneTexture after changing the bones. This is called automatically by the WebGLRenderer if the skeleton is used with a SkinnedMesh.
Implementation
void update() {
final bones = this.bones;
final boneInverses = this.boneInverses;
final boneMatrices = this.boneMatrices;
final boneTexture = this.boneTexture;
// flatten bone matrices to array
int il = bones.length;
for (int i = 0; i < il; i++) {
// compute the offset between the current and the original transform
final matrix = bones[i].matrixWorld;
_offsetMatrix.multiply2(matrix, boneInverses[i]);
_offsetMatrix.copyIntoArray(boneMatrices!.toList(), i * 16);
}
if (boneTexture != null) {
boneTexture.needsUpdate = true;
}
}