Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SplitsComponentState

The state object that describes a single segment's information to visualize.

Hierarchy

Index

Constructors

constructor

Properties

ptr

ptr: number

Methods

delta

  • delta(index: number): string
  • The delta to show for the segment with the specified index. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns string

dispose

  • dispose(): void
  • Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.

    Returns void

finalSeparatorShown

  • finalSeparatorShown(): boolean
  • Describes whether a more pronounced separator should be shown in front of the last segment provided.

    Returns boolean

iconChangeCount

  • iconChangeCount(): number

iconChangeIcon

  • iconChangeIcon(iconChangeIndex: number): string
  • The segment's icon encoded as a Data URL of the icon change with the specified index. The String itself may be empty. This indicates that there is no icon. You may not provide an out of bounds index.

    Parameters

    • iconChangeIndex: number

    Returns string

iconChangeSegmentIndex

  • iconChangeSegmentIndex(iconChangeIndex: number): number
  • Accesses the index of the segment of the icon change with the specified index. This is based on the index in the run, not on the index of the SplitState in the State object. The corresponding index is the index field of the SplitState object. You may not provide an out of bounds index.

    Parameters

    • iconChangeIndex: number

    Returns number

isCurrentSplit

  • isCurrentSplit(index: number): boolean
  • Describes if the segment with the specified index is the segment the active attempt is currently on.

    Parameters

    • index: number

    Returns boolean

len

  • len(): number
  • Returns the amount of segments to visualize.

    Returns number

name

  • name(index: number): string
  • The name of the segment with the specified index. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns string

semanticColor

  • semanticColor(index: number): string
  • The semantic coloring information the delta time carries of the segment with the specified index. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns string

time

  • time(index: number): string
  • The split time to show for the segment with the specified index. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns string

with

  • with<T>(closure: function): T
  • Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.

    Type parameters

    • T

    Parameters

    Returns T

Generated using TypeDoc