Add some utils fns, add moshi to cookbook, fix querySelector, support async functions in ReplyOnPause (#29)

* add

* add code
This commit is contained in:
Freddy Boulton
2024-12-04 15:14:19 -05:00
committed by GitHub
parent c85c117576
commit 868e0bfa64
9 changed files with 158 additions and 10 deletions

View File

@@ -41,8 +41,7 @@
function updateBars() {
analyser.getByteFrequencyData(dataArray);
const bars = document.querySelectorAll('.box');
const bars = document.querySelectorAll('.waveContainer .box');
for (let i = 0; i < bars.length; i++) {
const barHeight = (dataArray[i] / 255) * 2; // Amplify the effect
bars[i].style.transform = `scaleY(${Math.max(0.1, barHeight)})`;