Skip to main content

tweening

import {...} from "@revideo/core/lib/tweening";

Interpolation and timing of tweens.

Interfaces

Variables

BeatSpring

const BeatSpring: Spring = ...

BounceSpring

const BounceSpring: Spring = ...

JumpSpring

const JumpSpring: Spring = ...

PlopSpring

const PlopSpring: Spring = ...

SmoothSpring

const SmoothSpring: Spring = ...

StrikeSpring

const StrikeSpring: Spring = ...

SwingSpring

const SwingSpring: Spring = ...

Functions

arcLerp

public arcLerpvalue: numberreverse: booleanratio: number: Vector2

Parameters


boolLerp

public boolLerpTfrom: Tto: Tvalue: number: T

Type Parameters

Parameters


clamp

public clampmin: numbermax: numbervalue: number: number

Parameters


clampRemap

public clampRemapfromIn: numbertoIn: numberfromOut: numbertoOut: numbervalue: number: number

Parameters


cos

public cosvalue: numberfrom: number = 0to: number = 1: number

Parameters


createEaseInBack

public createEaseInBacks: number = 1.70158: TimingFunction

Parameters

  • s: number = 1.70158

createEaseInBounce

public createEaseInBouncen: number = 7.5625d: number = 2.75: TimingFunction

Parameters

  • n: number = 7.5625
  • d: number = 2.75

createEaseInElastic

public createEaseInElastics: number = 2.094395: TimingFunction

Parameters

  • s: number = 2.094395

createEaseInOutBack

public createEaseInOutBacks: number = 1.70158v: number = 1.525: TimingFunction

Parameters

  • s: number = 1.70158
  • v: number = 1.525

createEaseInOutBounce

public createEaseInOutBouncen: number = 7.5625d: number = 2.75: TimingFunction

Parameters

  • n: number = 7.5625
  • d: number = 2.75

createEaseInOutElastic

public createEaseInOutElastics: number = 1.39626: TimingFunction

Parameters

  • s: number = 1.39626

createEaseOutBack

public createEaseOutBacks: number = 1.70158: TimingFunction

Parameters

  • s: number = 1.70158

createEaseOutBounce

public createEaseOutBouncen: number = 7.5625d: number = 2.75: TimingFunction

Parameters

  • n: number = 7.5625
  • d: number = 2.75

createEaseOutElastic

public createEaseOutElastics: number = 2.094395: TimingFunction

Parameters

  • s: number = 2.094395

deepLerp

public deepLerpTFrom extends RecordanyunknownTTo extends Recordanyunknownfrom: TFromto: TTovalue: number: TFromTTo
public deepLerpTFrom extends RecordanyunknownTTo extends Recordanyunknownfrom: TFromto: TTovalue: numbersuppressWarnings: boolean: TFromTTo
public deepLerpTfrom: Tto: Tvalue: number: T
public deepLerpTfrom: Tto: Tvalue: numbersuppressWarnings: boolean: T

Interpolate between any two Records, including objects and Maps, even with mismatched keys.

Any old key that is missing in to will be removed immediately once value is not 0. Any new key that is missing in from will be added once value reaches

Type Parameters

  • TFrom extends Recordanyunknown
  • TTo extends Recordanyunknown

Parameters

  • from: TFrom

    The input to favor when value is 0.

  • to: TTo

    The input to favor when value is 1.

  • value: number

    On a scale between 0 and 1, how closely to favor from vs to.


easeInBack

public easeInBackvalue: numberfrom?: numberto?: number: number

Parameters


easeInBounce

public easeInBouncevalue: numberfrom?: numberto?: number: number

Parameters


easeInCirc

public easeInCircvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInCubic

public easeInCubicvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInElastic

public easeInElasticvalue: numberfrom?: numberto?: number: number

Parameters


easeInExpo

public easeInExpovalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInOutBack

public easeInOutBackvalue: numberfrom?: numberto?: number: number

Parameters


easeInOutBounce

public easeInOutBouncevalue: numberfrom?: numberto?: number: number

Parameters


easeInOutCirc

public easeInOutCircvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInOutCubic

public easeInOutCubicvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInOutElastic

public easeInOutElasticvalue: numberfrom?: numberto?: number: number

Parameters


easeInOutExpo

public easeInOutExpovalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInOutQuad

public easeInOutQuadvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInOutQuart

public easeInOutQuartvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInOutQuint

public easeInOutQuintvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInOutSine

public easeInOutSinevalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInQuad

public easeInQuadvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInQuart

public easeInQuartvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInQuint

public easeInQuintvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeInSine

public easeInSinevalue: numberfrom: number = 0to: number = 1: number

Parameters


easeOutBack

public easeOutBackvalue: numberfrom?: numberto?: number: number

Parameters


easeOutBounce

public easeOutBouncevalue: numberfrom?: numberto?: number: number

Parameters


easeOutCirc

public easeOutCircvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeOutCubic

public easeOutCubicvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeOutElastic

public easeOutElasticvalue: numberfrom?: numberto?: number: number

Parameters


easeOutExpo

public easeOutExpovalue: numberfrom: number = 0to: number = 1: number

Parameters


easeOutQuad

public easeOutQuadvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeOutQuart

public easeOutQuartvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeOutQuint

public easeOutQuintvalue: numberfrom: number = 0to: number = 1: number

Parameters


easeOutSine

public easeOutSinevalue: numberfrom: number = 0to: number = 1: number

Parameters


linear

public linearvalue: numberfrom: number = 0to: number = 1: number

Parameters


makeSpring

public makeSpringmass: numberstiffness: numberdamping: numberinitialVelocity?: number: Spring

Parameters


map

public mapfrom: numberto: numbervalue: number: number

Parameters


remap

public remapfromIn: numbertoIn: numberfromOut: numbertoOut: numbervalue: number: number

Parameters


sin

public sinvalue: numberfrom: number = 0to: number = 1: number

Parameters


spring

public springspring: nullSpringfrom: numberto: numbersettleTolerance: numberonProgress: ProgressFunctiononEnd?: ProgressFunction: ThreadGenerator
public springspring: nullSpringfrom: numberto: numberonProgress: ProgressFunctiononEnd?: ProgressFunction: ThreadGenerator

Parameters


textLerp

public textLerpfrom: stringto: stringvalue: number: string

Parameters


tween

public tweenseconds: numberonProgress: value: numbertime: number => voidonEnd?: value: numbertime: number => void: ThreadGenerator

Parameters