Skip to content

Commit

Permalink
Fix drain
Browse files Browse the repository at this point in the history
  • Loading branch information
kotsoft committed May 14, 2024
1 parent 3cf38c6 commit 4566100
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sim_5.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ class Simulator {
this.drainParticles();
}

this.populateHashGrid();

const dt = this.material.dt;

const gravX = 0.02 * this.material.kernelRadius * this.material.gravX * dt;
Expand Down Expand Up @@ -291,7 +293,7 @@ class Simulator {
// }
}

this.populateHashGrid();


this.adjustSprings(dt);
this.applySpringDisplacements(dt);
Expand Down

0 comments on commit 4566100

Please sign in to comment.