PitchKit
API Reference@pitchkit/coreFunctions

racePeriodRanges()

function racePeriodRanges(events, endTime?): MomentumRange[];

Defined in: packages/core/src/race/cumulative.ts:160

Each period's range in match minutes, for laying a race chart out one period after another (layoutMomentumPanels with no gap).

Every period from the first to the latest one seen gets a range, so a quiet period still has somewhere to be, and there are always at least two halves. Each range is its nominal one extended to its own last event (resolvePeriodRange), so stoppage time widens its own half rather than the next one. endTime, when given, sets where the last period ends.

Parameters

ParameterType
eventsreadonly Pick<RaceEvent, "time" | "period">[]
endTime?number

Returns

MomentumRange[]

On this page