Skip to content

Commit

Permalink
Remove unnecessary values from entries and support 2 sources, see #300
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jan 5, 2019
1 parent 48bc1c7 commit 11c98ad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/common/model/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,8 @@ define( require => {
lattice.setCurrentValue( WaveInterferenceConstants.POINT_SOURCE_HORIZONTAL_COORDINATE, j, waveValue );
this.oscillator1Property.value = waveValue;

// TODO: doesn't distinguish between passing through zero and a true zero. We would need that probably.
this.entries.push( {
stepIndex: this.stepIndex,
value: this.oscillator1Property.value,
state: 'on',
sourcePosition: new Vector2( WaveInterferenceConstants.POINT_SOURCE_HORIZONTAL_COORDINATE, j )
} );
Expand All @@ -433,6 +431,12 @@ define( require => {
const j = latticeCenterJ - distanceFromCenter;
lattice.setCurrentValue( WaveInterferenceConstants.POINT_SOURCE_HORIZONTAL_COORDINATE, j, waveValue );
this.oscillator2Property.value = waveValue;

this.entries.push( {
stepIndex: this.stepIndex,
state: 'on',
sourcePosition: new Vector2( WaveInterferenceConstants.POINT_SOURCE_HORIZONTAL_COORDINATE, j )
} );
}
}

Expand Down

0 comments on commit 11c98ad

Please sign in to comment.