Skip to content

Commit

Permalink
fix for charge deflection sounds when charges not moving, see #547
Browse files Browse the repository at this point in the history
(cherry picked from commit 0974e75)
  • Loading branch information
jbphet committed Oct 25, 2021
1 parent 2f3ce20 commit 4518d39
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class ChargeDeflectionSoundGenerator extends SoundGenerator {
const chargeIndex = this.wallCharges.indexOf( charge );

// Check whether the charge has moved since the last drag.
if ( !charge.position.equals( this.previousChargePositions[ chargeIndex ] ) ) {
if ( !charge.positionProperty.value.equals( this.previousChargePositions[ chargeIndex ] ) ) {

const playbackRateForBin = mapBinToPlaybackRate( this.chargeDeflectionBins[ chargeIndex ] );

Expand Down

0 comments on commit 4518d39

Please sign in to comment.