Skip to content

SoundDragListener

Overview

SoundDragListener extends DragListener to integrate PhET-specific sounds for grab and release.

For grab and release sounds, responsibilities include: - provide default sound files - create SoundClips and register them with soundManager - dispose of SoundClips and deregister them with soundManager

@author Agustín Vallejo @author Michael Kauzmann @author Chris Malley (PixelZoom, Inc.) @author Jesse Greenberg

Class SoundDragListener

import { SoundDragListener } from 'scenerystack/scenery-phet';

Constructor

new SoundDragListener( providedOptions : SoundDragListenerOptions )

Instance Methods

Type PressedSoundDragListener

Pattern followed from DragListenerOptions.

import type { PressedSoundDragListener } from 'scenerystack/scenery-phet';

SoundDragListener & PressedDragListener

Type SoundDragListenerOptions

import type { SoundDragListenerOptions } from 'scenerystack/scenery-phet';

DragListenerOptions<Listener> & RichDragListenerSoundOptions

Source Code

See the source for SoundDragListener.ts in the scenery-phet repository.