Skip to content

Commit

Permalink
docs(audio): fix sound example
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaisthorpe committed Jun 16, 2024
1 parent 1baa2f0 commit e69f263
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/docs/src/audio/sound-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class Actor extends TActor {
super();

const clip = engine.resources.get<TSound>(sound);
if (!clip) {
return;
}

clip.volume = 0.7;

const section = engine.debugPanel.addSection('Audio', true);
Expand All @@ -26,7 +30,7 @@ class Actor extends TActor {
(value: string) => {
clip.volume = parseFloat(value);
},
{ max: 1, min: 0, step: 0.1 }
{ max: 1, min: 0, step: 0.1 },
);
}
}
Expand Down

0 comments on commit e69f263

Please sign in to comment.