INNER CODE UNIT · JavaScript

enter

mario-andreschak/FLUJO · githubpages/short/app.js:266

    const enter = smoothstep(invLerp(start, start + fadeIn, t));
    const leave = 1 - smoothstep(invLerp(end - fadeOut, end, t));
    return Math.min(enter, leave);
  }

  function activateScene(scene, t) {
    const el = sceneEls.get(scene.id);
    const opacity = sceneOpacity(t, scene.start, scene.end);
    el.style.opacity = opacity.toFixed(4);
    el.style.visibility = opacity > .001 ? "visible" : "hidden";
    return { el, local: t - scene.start, opacity };
  }

  function reveal(el, local, at, duration = .8, options = {}) {
    const {
      x = 0,
      y = 22,
      scale = .92,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…