add render sound

This commit is contained in:
ochafik 2024-07-08 02:45:23 +01:00
commit b47300be7a
3 changed files with 9 additions and 0 deletions

BIN
public/complete.wav Normal file

Binary file not shown.

View file

@ -101,6 +101,10 @@
</style>
<style>.github-fork-ribbon:before { background-color: #333; }</style>
<audio id="complete-sound">
<source src="complete.wav" type="audio/wav" />
Your browser does not support the audio element.
</audio>
</head>
<body>
<a target="_blank" class="github-fork-ribbon"

View file

@ -178,6 +178,11 @@ export class Model {
formattedElapsedMillis: formatMillis(output.elapsedMillis),
formattedStlFileSize: formatBytes(output.stlFile.size),
};
if (!isPreview) {
const audio = document.getElementById('complete-sound') as HTMLAudioElement;
audio?.play();
}
}
});
}})