Przeglądaj źródła

Fix Barycenter Reset

sebavan 6 lat temu
rodzic
commit
32711aa5b9
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/Particles/solidParticleSystem.ts

+ 1 - 0
src/Particles/solidParticleSystem.ts

@@ -277,6 +277,7 @@ export class SolidParticleSystem implements IDisposable {
             var shapeUV: number[] = this._uvsToShapeUV(facetUV);
 
             // compute the barycenter of the shape
+            barycenter.copyFromFloats(0, 0, 0);
             var v: number;
             for (v = 0; v < shape.length; v++) {
                 barycenter.addInPlace(shape[v]);