RPE Chart Utils
    Preparing search index...

    Class EventBuilder

    Fluent wrapper around a single event inside an EventLayer channel.

    Obtain an instance via:

    • EventLayerBuilder.getEvent(channel, index)
    • EventLayerBuilder.firstEvent(channel)

    All mutating methods return this for chaining. Use .toLayer() or .toLine() to navigate back up the hierarchy.

    new LineBuilder(chart, 0)
    .getLayer(0)
    .firstEvent('moveX')
    .setValue(100)
    .setEasingType(4); // cubicIn
    Index

    Constructors

    Properties

    chart: RpeJson
    lineIndex: number
    layerIndex: number
    channel: EventChannel
    eventIndex: number

    Accessors

    Methods

    • Set the start beat of this event. Updates both startBeat and startTime.

      Parameters

      • beat: number

      Returns this

    • Set the end beat of this event. Updates both endBeat and endTime. Must be >= startBeat.

      Parameters

      • beat: number

      Returns this

    • Set the start value of this event.

      Parameters

      • value: number

      Returns this

    • Set the end value of this event.

      Parameters

      • value: number

      Returns this

    • Set both start and end to the same constant value.

      Parameters

      • value: number

      Returns this

    • Set the RPE easing type (1–28) or name (e.g., 'cubicOut'). Only applies to non-speed events that support easing.

      Parameters

      • type:
            | number
            | "linear"
            | "sineOut"
            | "sineIn"
            | "quadOut"
            | "quadIn"
            | "sineInOut"
            | "quadInOut"
            | "cubicOut"
            | "cubicIn"
            | "quartOut"
            | "quartIn"
            | "cubicInOut"
            | "quartInOut"
            | "quintOut"
            | "quintIn"
            | "expoOut"
            | "expoIn"
            | "circOut"
            | "circIn"
            | "backOut"
            | "backIn"
            | "circInOut"
            | "backInOut"
            | "elasticOut"
            | "elasticIn"
            | "bounceOut"
            | "bounceIn"
            | "bounceInOut"

      Returns this

    • Set the easing sub-range [left, right] within 0–1. Shrinks the visible easing window. Not applicable to speed events.

      Parameters

      • left: number
      • right: number

      Returns this

    • Enable cubic bezier easing with the given control points. Points are [p1x, p1y, p2x, p2y], each in [0, 1].

      Parameters

      • p1x: number
      • p1y: number
      • p2x: number
      • p2y: number

      Returns this

    • Disable bezier easing (revert to easingType).

      Returns this

    • Set the link-group ID (0 = no group).

      Parameters

      • id: number

      Returns this