From 456610031ef5e364b2e40b4f9f90af0661274823 Mon Sep 17 00:00:00 2001 From: Grant Kot Date: Tue, 14 May 2024 18:19:00 -0400 Subject: [PATCH] Fix drain --- sim_5.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sim_5.js b/sim_5.js index 9c8a030..8821b70 100644 --- a/sim_5.js +++ b/sim_5.js @@ -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; @@ -291,7 +293,7 @@ class Simulator { // } } - this.populateHashGrid(); + this.adjustSprings(dt); this.applySpringDisplacements(dt);