Skip to content

Commit

Permalink
touched up the conversion to TS, see phetsims/scenery-phet#726 and #160
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Mar 23, 2022
1 parent 0d6bd95 commit 9adbbec
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions js/ISoundPlayer.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2022, University of Colorado Boulder

/**
* SoundPlayer is a "definition" type, based off of PaintDef.js, that defines a type that is used in the tambo sound
* library but is not actually a base class. This is similar to the idea of an "interface" in Java. A SoundPlayer type
* is a sound generator that has just the most basic methods for playing a sound.
* SoundPlayer is a "definition" type, initially based off of PaintDef.js, that defines a type that is used in the tambo
* sound library but is not actually a base class. This is similar to the idea of an "interface" in Java. A
* SoundPlayer type is a sound generator that has just the most basic methods for playing a sound.
*
* @author John Blanco (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/phetAudioContext.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2018-2022, University of Colorado Boulder

/**
* phetAudioContext is a singleton instance of a Web Audio context that is used for all Web Audio interaction
* `phetAudioContext` is a singleton instance of a Web Audio context that is used for all Web Audio interaction within
* a sim.
*
* @author John Blanco
*/
Expand Down
3 changes: 2 additions & 1 deletion js/sound-generators/SoundGenerator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2018-2022, University of Colorado Boulder

/**
* abstract base class for Web Audio based sound producing element that work in conjunction with the soundManager
* SoundGenerator is an abstract base class for Web-Audio-based sound-producing elements that work in conjunction with
* the soundManager to produces sounds.
*
* @author John Blanco (PhET Interactive Simulations)
*/
Expand Down
5 changes: 3 additions & 2 deletions js/sound-generators/ValueChangeSoundGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
*
* Because the sounds should only be produced when direct interactions from the user change a value, and not in other
* situations (e.g. a reset), this class does not monitor a Property. Instead, it provides methods that can be used to
* evaluate changes in value and potentially play sounds, and it is the client's responsibility to know the situations
* in which these methods should be called.
* evaluate changes in a value and potentially play sounds, and it is the client's responsibility to know the situations
* in which these methods should be called. Often these methods will be called in drag handlers and other code that
* handles user input.
*
* @author John Blanco (PhET Interactive Simulations)
*/
Expand Down

0 comments on commit 9adbbec

Please sign in to comment.