tweening
import {...} from "@motion-canvas/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
Parameters
boolLerp
Type Parameters
Parameters
clamp
Parameters
clampRemap
Parameters
cos
Parameters
createEaseInBack
public createEaseInBacks: number = 1.70158: TimingFunction
Parameters
s: number = 1.70158
createEaseInBounce
public createEaseInBouncen: number = 7.5625d: number = 2.75: TimingFunction
Parameters
createEaseInElastic
public createEaseInElastics: number = 2.094395: TimingFunction
Parameters
s: number = 2.094395
createEaseInOutBack
public createEaseInOutBacks: number = 1.70158v: number = 1.525: TimingFunction
Parameters
createEaseInOutBounce
public createEaseInOutBouncen: number = 7.5625d: number = 2.75: TimingFunction
Parameters
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
createEaseOutElastic
public createEaseOutElastics: number = 2.094395: TimingFunction
Parameters
s: number = 2.094395
deepLerp
public deepLerpTFrom extends RecordanyunknownTTo extends Recordanyunknownfrom: TFromto: TTovalue: number: TFromTTo
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
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
Parameters
easeInBounce
Parameters
easeInCirc
Parameters
easeInCubic
Parameters
easeInElastic
Parameters
easeInExpo
Parameters
easeInOutBack
Parameters
easeInOutBounce
Parameters
easeInOutCirc
Parameters
easeInOutCubic
Parameters
easeInOutElastic
Parameters
easeInOutExpo
Parameters
easeInOutQuad
Parameters
easeInOutQuart
Parameters
easeInOutQuint
Parameters
easeInOutSine
Parameters
easeInQuad
Parameters
easeInQuart
Parameters
easeInQuint
Parameters
easeInSine
Parameters
easeOutBack
Parameters
easeOutBounce
Parameters
easeOutCirc
Parameters
easeOutCubic
Parameters
easeOutElastic
Parameters
easeOutExpo
Parameters
easeOutQuad
Parameters
easeOutQuart
Parameters
easeOutQuint
Parameters
easeOutSine
Parameters
linear
Parameters
makeSpring
public makeSpringmass: numberstiffness: numberdamping: numberinitialVelocity?: number: Spring
Parameters
mass: number
stiffness: number
damping: number
initialVelocity?: number
map
Parameters
remap
Parameters
sin
Parameters
spring
public springspring: nullSpringfrom: numberto: numbersettleTolerance: numberonProgress: ProgressFunctiononEnd?: ProgressFunction: ThreadGenerator
public springspring: nullSpringfrom: numberto: numberonProgress: ProgressFunctiononEnd?: ProgressFunction: ThreadGenerator
Parameters
spring: nullSpring
from: number
to: number
settleTolerance: number
onProgress: ProgressFunction
onEnd?: ProgressFunction
textLerp
public textLerpfromString: stringtoString: stringvalue: number: string
Parameters
fromString: string
toString: string
value: number
tween
public tweenseconds: numberonProgress: value: numbertime: number => voidonEnd?: value: numbertime: number => void: ThreadGenerator