RPE Chart Utils
    Preparing search index...

    Function duplicateLine

    • Duplicate a line (deep copy) and append it to the chart.

      The copy's Name is set to <original.Name>_copy. Its father and zOrder are inherited unchanged.

      Parameters

      • chart: RpeJson

        The RPE chart (modified in place).

      • lineIndex: number

        Index of the line to duplicate.

      • includeNotes: boolean = true

        Copy notes as well (default: true). Pass false to copy only the line's animation events.

      Returns number

      The index of the new line.

      const newIdx = duplicateLine(chart, 0, false); // copy events only
      chart.judgeLineList[newIdx]!.Name = 'Mirror';