Skip to content

Commit

Permalink
replace enableControlProperties with enabledProperty, mute sounds dur…
Browse files Browse the repository at this point in the history
…ing reset by default, & other sound lib API improvements, see phetsims/tambo#189
  • Loading branch information
jbphet committed Jul 12, 2024
1 parent 72faa39 commit 28c9ea8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions js/balloons-and-static-electricity/view/BASEView.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ class BASEView extends ScreenView {
model.balloons,
{
initialOutputLevel: 0.3,

enableControlProperties: [
new DerivedProperty( [ model.showChargesProperty ], showCharges => showCharges === 'all' )
]
enabledProperty: new DerivedProperty( [ model.showChargesProperty ], showCharges => showCharges === 'all' )
}
);
soundManager.addSoundGenerator( this.chargeDeflectionSoundGenerator );
Expand Down
4 changes: 2 additions & 2 deletions js/balloons-and-static-electricity/view/BalloonNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class BalloonNode extends Node {

// {Object} - options passed to the drift velocity sound generator
balloonVelocitySoundGeneratorOptions: {
enableControlProperties: [ model.isVisibleProperty ]
enabledProperty: model.isVisibleProperty
},

// {Object} - options passed to the balloon rubbing sound generator
Expand Down Expand Up @@ -251,7 +251,7 @@ class BalloonNode extends Node {

// sound generation for charges moving on to this balloon
const popSoundGenerator = new PitchedPopGenerator( {
enableControlProperties: [ chargesShownOnBalloonProperty ],
enabledProperty: chargesShownOnBalloonProperty,
initialOutputLevel: 0.3
} );
soundManager.addSoundGenerator( popSoundGenerator );
Expand Down

0 comments on commit 28c9ea8

Please sign in to comment.