bugfix: wrong polytope faces

reproduce:
1. polytope on
2. polytope off
3. toggle physics on then off (want big change)
4. polytope on
This commit is contained in:
root 2025-04-27 10:09:16 +00:00
parent 9194832b01
commit afd3392611

View file

@ -78,6 +78,7 @@ function draw() {
const polytope_is_slow = physics && particles.length > 40 || particles.length > 120; const polytope_is_slow = physics && particles.length > 40 || particles.length > 120;
const polytope_if_fast = polytope && !polytope_is_slow; const polytope_if_fast = polytope && !polytope_is_slow;
if (physics) { if (physics) {
if (!polytope_if_fast) faces = [];
move_particles(particles, 8e-4); move_particles(particles, 8e-4);
} }