Skip to Content

@revideo/core


@revideo/core / tweening / deepLerp

Function: deepLerp()

Call Signature

deepLerp<TFrom, TTo>(from, to, value): TFrom | TTo

Defined in: tweening/interpolationFunctions.ts:56 

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

Type Parameters

TFrom

TFrom extends Record<any, unknown>

TTo

TTo extends Record<any, unknown>

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.

Returns

TFrom | TTo

A value matching the structure of from and to.

Remarks

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 1.

Call Signature

deepLerp<TFrom, TTo>(from, to, value, suppressWarnings): TFrom | TTo

Defined in: tweening/interpolationFunctions.ts:60 

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

Type Parameters

TFrom

TFrom extends Record<any, unknown>

TTo

TTo extends Record<any, unknown>

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.

suppressWarnings

boolean

Returns

TFrom | TTo

A value matching the structure of from and to.

Remarks

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 1.

Call Signature

deepLerp<T>(from, to, value): T

Defined in: tweening/interpolationFunctions.ts:73 

Interpolate between any two values, including objects, arrays, and Maps.

Type Parameters

T

T

Parameters

from

T

The input to favor when value is 0.

to

T

The input to favor when value is 1.

value

number

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

Returns

T

A value matching the structure of from and to.

Call Signature

deepLerp<T>(from, to, value, suppressWarnings): T

Defined in: tweening/interpolationFunctions.ts:74 

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

Type Parameters

T

T

Parameters

from

T

The input to favor when value is 0.

to

T

The input to favor when value is 1.

value

number

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

suppressWarnings

boolean

Returns

T

A value matching the structure of from and to.

Remarks

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 1.

© 2026 Haven Technologies, Inc.
Function: deepLerp() – Revideo