INNER CODE UNIT · JavaScript

t

jatinkrmalik/LLMFeeder · web/main.js:200

    const t = Math.min(1, Math.max(0, (progress - 0.04) / 0.78));
    const value = Math.round(TOKENS_RAW + (TOKENS_MD - TOKENS_RAW) * t);
    readout.style.setProperty("--tok", String(value));
  }

  if (track && !reduceMotion) {
    let ticking = false;
    let visible = false;

    const update = () => {
      const rect = track.getBoundingClientRect();
      const viewport = window.innerHeight;
      const scrollable = rect.height - viewport;
      const progress =
        scrollable > 40
          ? Math.min(1, Math.max(0, -rect.top / scrollable))
          : Math.min(1, Math.max(0, (viewport - rect.top) / (viewport + rect.height)));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…