Skip to content

Commit

Permalink
added softer attach for primary emission, see #216
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Nov 26, 2019
1 parent 9144d53 commit 63f22f5
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 4 deletions.
12 changes: 10 additions & 2 deletions js/moleculesandlight/view/MoleculesAndLightScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ define( require => {
const infraredPhotonV3SoundInfo = require( 'sound!MOLECULES_AND_LIGHT/photon-v3-4th-interval-001.mp3' );
const visiblePhotonV3SoundInfo = require( 'sound!MOLECULES_AND_LIGHT/photon-v3-4th-interval-002.mp3' );
const ultravioletPhotonV3SoundInfo = require( 'sound!MOLECULES_AND_LIGHT/photon-v3-4th-interval-003.mp3' );
const microwavePhotonV3saSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/photon-v3-4th-interval-000-softened-attack.mp3' );
const infraredPhotonV3saSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/photon-v3-4th-interval-001-softened-attack.mp3' );
const visiblePhotonV3saSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/photon-v3-4th-interval-002-softened-attack.mp3' );
const ultravioletPhotonV3saSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/photon-v3-4th-interval-003-softened-attack.mp3' );

// constants
// Model-view transform for intermediate coordinates.
Expand Down Expand Up @@ -361,6 +365,12 @@ define( require => {
new SoundClip( infraredPhotonV3SoundInfo, photonSoundClipOptions ),
new SoundClip( visiblePhotonV3SoundInfo, photonSoundClipOptions ),
new SoundClip( ultravioletPhotonV3SoundInfo, photonSoundClipOptions )
],
[
new SoundClip( microwavePhotonV3saSoundInfo, photonSoundClipOptions ),
new SoundClip( infraredPhotonV3saSoundInfo, photonSoundClipOptions ),
new SoundClip( visiblePhotonV3saSoundInfo, photonSoundClipOptions ),
new SoundClip( ultravioletPhotonV3saSoundInfo, photonSoundClipOptions )
]
];
photonEmissionSoundPlayers.forEach( soundSet => {
Expand All @@ -373,8 +383,6 @@ define( require => {
if ( photon.locationProperty.value.x < 0 ) {

// photon was emitted from lamp, use the initial emission sound
// soundSetIndex = malSoundOptionsDialogContent.photonInitialEmissionSoundSetProperty.value - 1;

const playEmitFromLampSound = position => {
if ( position.x >= PLAY_LAMP_EMISSION_X_POSITION ) {
const soundSetIndex = malSoundOptionsDialogContent.photonInitialEmissionSoundSetProperty.value - 1;
Expand Down
4 changes: 2 additions & 2 deletions js/moleculesandlight/view/malSoundOptionsDialogContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ define( require => {
// radio button entries, but I've done it this way so that the sound families can be easily named if desired.
const photonInitialEmissionRadioButtonGroup = new VerticalAquaRadioButtonGroup(
this.photonInitialEmissionSoundSetProperty,
createNumberedRadioButtonDescriptorSet( 3 )
createNumberedRadioButtonDescriptorSet( 4 )
);
const photonInitialEmissionSoundSelectionPanel = new Panel(
new VBox( {
Expand All @@ -78,7 +78,7 @@ define( require => {
// Create the secondary photon emission radio buttons.
const photonSecondaryEmissionRadioButtonGroup = new VerticalAquaRadioButtonGroup(
this.photonSecondaryEmissionSoundSetProperty,
createNumberedRadioButtonDescriptorSet( 3 )
createNumberedRadioButtonDescriptorSet()
);
const photonSecondaryEmissionSoundSelectionPanel = new Panel(
new VBox( {
Expand Down
32 changes: 32 additions & 0 deletions sounds/license.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"photon-v3-4th-interval-000-softened-attack.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
],
"projectURL": "http://phet.colorado.edu",
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"photon-v3-4th-interval-001.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
Expand All @@ -95,6 +103,14 @@
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"photon-v3-4th-interval-001-softened-attack.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
],
"projectURL": "http://phet.colorado.edu",
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"photon-v3-4th-interval-002.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
Expand All @@ -103,6 +119,14 @@
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"photon-v3-4th-interval-002-softened-attack.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
],
"projectURL": "http://phet.colorado.edu",
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"photon-v3-4th-interval-003.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
Expand All @@ -111,6 +135,14 @@
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"photon-v3-4th-interval-003-softened-attack.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
],
"projectURL": "http://phet.colorado.edu",
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"rotate-002.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 63f22f5

Please sign in to comment.