Skip to content

Commit fe3c09c

Browse files
committed
fix(Car.js): fix honk proximity gain
1 parent 22ebcc7 commit fe3c09c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/scripts/cars/Car.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,8 @@ export default class Car {
408408
*/
409409
_createHonk() {
410410
// Honk sfx
411-
const dist = new Tone.Distortion(0.8).toDestination();
412411
this.honk = new Tone.Synth({
413-
"volume": -12,
412+
"volume": 0,
414413
"detune": 50,
415414
"portamento": 1,
416415
"envelope": {
@@ -482,8 +481,7 @@ export default class Car {
482481
}).toDestination();
483482

484483
// Connect to gain node to control proximity audio
485-
dist.connect(this.gainNode);
486-
this.honk.connect(dist);
484+
this.honk.connect(this.gainNode);
487485

488486
// Honk with space
489487
window.addEventListener('keydown', (e) => {

0 commit comments

Comments
 (0)