mwg API
    Preparing search index...

    Function watchReducedMotion

    • Calls listener whenever the effective preference changes, whether the OS setting moved or a game called setReducedMotion. It does not fire immediately: reducedMotion() is the current value. A long-lived animation (a parallax layer, a looping background) subscribes so it can stop mid-flight rather than at its next spawn or start.

      Parameters

      • listener: (reduced: boolean) => void

      Returns () => void

      a function that stops watching