INNER CODE UNIT · JavaScript

startDot

Picovoice/picollm · demo/web/chat/src/main.js:32

  const startDot = () => {
    if (dotInterval) {
      clearInterval(dotInterval);
    }
    dotInterval = setInterval(() => {
      dotIdx = (dotIdx + 1) % 4;
      let dotText = "";
      for (let i = 0; i < dotIdx; i++) {
        dotText += ".";
      }
      dotdotdot.innerText = dotText;
    }, 500);
  };

  const stopDot = () => {
    if (dotInterval) {
      clearInterval(dotInterval);
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…