RPE Chart Utils
    Preparing search index...

    Function getLineState

    • Compute the full state of a judge line at a given beat.

      Evaluates all event layers (summing their contributions), computes the accumulated scroll height from speed events, evaluates extended events (incline, scale, color, text), applies chart-flipping, resolves parent chains recursively, and converts everything to scene-space coordinates.

      You must call preprocess(chart) or initBpmList(chart.BPMList) before using this function.

      Parameters

      • chart: RpeJson

        The parsed RPE chart.

      • lineIndex: number

        Index of the line in judgeLineList.

      • beat: number

        Current beat.

      • chartFlipping: number = 0

        Bit flags: 0 = none, 1 = horizontal, 2 = vertical, 3 = both.

      Returns LineState

      The full computed LineState.

      const state = getLineState(chart, 0, 4);
      // state.sceneX / state.sceneY — absolute pixel position
      // state.rotationRad — current rotation in radians
      // state.opacity — [0, 1] alpha
      // state.color — [r, g, b] or undefined