From 65d3eb394107b1abe7d2fd86c5c3fb4113c4c045 Mon Sep 17 00:00:00 2001 From: samreid Date: Tue, 22 Jan 2019 21:13:25 -0700 Subject: [PATCH] Keep at least 3 deltas, see https://github.com/phetsims/wave-interference/issues/319 --- js/common/model/TemporalMask.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/common/model/TemporalMask.js b/js/common/model/TemporalMask.js index d715b84f..8df59a9a 100644 --- a/js/common/model/TemporalMask.js +++ b/js/common/model/TemporalMask.js @@ -98,9 +98,9 @@ define( require => { const steps = numberOfSteps - delta.numberOfSteps; - // max numberOfSteps is across the diagonal of the lattice, but don't remove the last element or the wave could - // clear - if ( this.deltas.length > 1 && + // max numberOfSteps is across the diagonal of the lattice, but don't remove the last elements or the wave could + // clear, see https://github.com/phetsims/wave-interference/issues/319 + if ( this.deltas.length > 3 && // d = vt, t=d/v ( steps > maxDistance / Lattice.WAVE_SPEED ||