Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Timing"

Index

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

TimingBase

TimingBase: MillisecondsAccepted

The accepted base values for the Timing divisions.

Variables

Const timingBase

timingBase: Milliseconds = new Milliseconds(200)

The default 500 value for the Timing class.

Functions

timingConvert

  • Performs the conversion of a value into the milliseconds. The divisions can be passed as MillisecondsAccepted so we must chage all divisions into Milliseconds classes.

    Parameters

    Returns IDivisions<Milliseconds>

    the corresponding millisecond divisions

timingRatio

  • timingRatio(last: Milliseconds, multiplier: number): Milliseconds
  • Calculates the steps of the timing. Multipies the values by the multiplier on larger (>500) divisions and reduces smaller (<500) by an inverse multiplier amount.

    example
    A basic set of divisions ```ts import { Timing, Scale } from '@ef-carbon/react-native-style'; const timing = new Timing({ base: 100, scale: (2 as Scale) }); timing.snail; // -> 6.25 timing.slowest; // -> 12.5 timing.slower; // -> 25 timing.slow; // -> 50 timing.normal; // -> 100 timing.fast; // -> 200 timing.faster; // -> 400 timing.fastest; // -> 800 timing.lightening; // -> 1600 ```

    Parameters

    • last: Milliseconds

      the previous step value

    • multiplier: number

      the scale to increase/decrease by

    Returns Milliseconds

    the next step value