meo-canvas
    Preparing search index...

    Interface PageInfo

    Where one page sits in a sequence.

    The four derived numbers rather than the index alone, because each is the right one for a different job and deriving the wrong one is a bug that looks like a design choice.

    interface PageInfo {
        count: number;
        cycle: number;
        index: number;
        progress: number;
        time: number;
    }
    Index
    count: number

    Total pages in this render.

    cycle: number

    Position around a loop, 0 on the first page and approaching 1 without reaching it.

    index / count, and the one to feed anything periodic. 1 and 0 are the same point on a circle, so driving a rotation from PageInfo.progress makes the last page a copy of the first and the animation stutters for one frame on every repeat. A single-page render reports 0.

    index: number

    Zero-based position in the sequence.

    progress: number

    Position along the sequence, 0 on the first page and 1 on the last.

    index / (count - 1), which spans the sequence inclusively: a one-shot animation should finish at its end value on the frame the viewer stops on. The wrong curve for anything that repeats — see PageInfo.cycle. A single-page render reports 0.

    time: number

    Seconds elapsed at this page, index / fps.

    What physics and spring integration want. Spans [0, duration) for the reason PageInfo.cycle does.