|
@@ -2095,9 +2095,9 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
let matricesIndices = (<FloatArray>this.getVerticesData(VertexBuffer.MatricesIndicesKind));
|
|
|
let matricesIndicesExtra = (<FloatArray>this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind));
|
|
|
let numBadBoneIndices: number = 0;
|
|
|
- for (var a = 0; a < numWeights; a++) {
|
|
|
+ for (var a = 0; a < numWeights; a += 4) {
|
|
|
for (var b = 0; b < numInfluences; b++) {
|
|
|
- let index = b < 4 ? matricesIndices[b] : matricesIndicesExtra[b - 4];
|
|
|
+ let index = b < 4 ? matricesIndices[a + b] : matricesIndicesExtra[a + b - 4];
|
|
|
if (index >= numBones || index < 0) { numBadBoneIndices++; }
|
|
|
}
|
|
|
}
|