|
@@ -2094,10 +2094,10 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
let numBones: number = this.skeleton.bones.length;
|
|
let numBones: number = this.skeleton.bones.length;
|
|
let matricesIndices = (<FloatArray>this.getVerticesData(VertexBuffer.MatricesIndicesKind));
|
|
let matricesIndices = (<FloatArray>this.getVerticesData(VertexBuffer.MatricesIndicesKind));
|
|
let matricesIndicesExtra = (<FloatArray>this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind));
|
|
let matricesIndicesExtra = (<FloatArray>this.getVerticesData(VertexBuffer.MatricesIndicesExtraKind));
|
|
- let numBadBoneIndices: number = 0;
|
|
|
|
- for (var a = 0; a < numWeights; a++) {
|
|
|
|
|
|
+ let numBadBoneIndices: number = 0;
|
|
|
|
+ for (var a = 0; a < numWeights; a += 4) {
|
|
for (var b = 0; b < numInfluences; b++) {
|
|
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++; }
|
|
if (index >= numBones || index < 0) { numBadBoneIndices++; }
|
|
}
|
|
}
|
|
}
|
|
}
|