Given value of 0 for weird amplitudes
This commit is contained in:
parent
22351bb4eb
commit
4bf3a8094a
@ -218,7 +218,11 @@ class GeneratedShape {
|
|||||||
**/
|
**/
|
||||||
// sound and properties passed into shape creation
|
// sound and properties passed into shape creation
|
||||||
this.soundRecorded = soundRecorded;
|
this.soundRecorded = soundRecorded;
|
||||||
this.soundAmplitude = soundAmplitude;
|
|
||||||
|
// ensure that erroneous minus amplitudes are at least given 0
|
||||||
|
if (soundAmplitude < 0) this.soundAmplitude = 0.0;
|
||||||
|
else this.soundAmplitude = soundAmplitude;
|
||||||
|
|
||||||
this.soundDuration = soundDuration;
|
this.soundDuration = soundDuration;
|
||||||
|
|
||||||
// mouse hover awareness for sound playing
|
// mouse hover awareness for sound playing
|
||||||
|
Loading…
Reference in New Issue
Block a user