SoundRichDragListener¶
Overview¶
A RichDragListener that supports sounds for grab and release.
@author Jesse Greenberg
Class SoundRichDragListener¶
Constructor¶
new SoundRichDragListener( providedOptions? : SoundRichDragListenerOptions )¶
Instance Methods¶
Static Methods¶
linkToDragEvents( dragListener : DragListener | KeyboardDragListener, grabSound : TSoundPlayer | null | undefined, releaseSound : TSoundPlayer | null | undefined )¶
Plays the sounds when the drag listener is pressed or released.
Static Properties¶
DEFAULT_SOUND_OPTIONS¶
(readonly)
Type RichDragListenerSoundOptions¶
Options for drag listeners that are specific to sound.
- grabSoundPlayer?: TSoundPlayer | null
Grab and release sounds.null
means no sound. - releaseSoundPlayer?: TSoundPlayer | null
Type SoundRichDragListenerOptions¶
- keyboardDragListenerSoundOptions?: RichDragListenerSoundOptions
Sound players that only apply to the keyboard drag listener. - dragListenerSoundOptions?: RichDragListenerSoundOptions
Sound players that only apply to the drag listener. - & RichDragListenerOptions & RichDragListenerSoundOptions
Source Code¶
See the source for SoundRichDragListener.ts in the scenery-phet repository.