API Reference / @gtkx/animated / Interpolation
Class: Interpolation<Input, Output>
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:17
An Interpolation is a memoized value that's computed whenever one of its FluidValue dependencies has its value changed.
Other FrameValue objects can depend on this. For example, passing an Interpolation as the to prop of a useSpring call will trigger an animation toward the memoized value.
Extends
FrameValue<Output>
Type Parameters
Input
Input = any
Output
Output = any
Constructors
Constructor
new Interpolation<
Input,Output>(source,args):Interpolation<Input,Output>
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:28
Parameters
source
unknown
args
InterpolatorArgs<Input, Output>
Returns
Interpolation<Input, Output>
Overrides
Properties
_active
protected_active:Set<FluidValue<any,any>>
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:27
The inputs which are currently animating
_priority
protected_priority:number
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:50
Inherited from
calc
readonlycalc:InterpolatorFn<Input,Output>
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:25
The function that maps inputs values to output
id
readonlyid:number
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:47
Inherited from
idle
idle:
boolean
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:23
Equals false when in the frameloop
Overrides
key?
optionalkey?:string
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:21
Useful for debugging.
Overrides
source
readonlysource:unknown
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:19
The source of input values
Accessors
priority
Get Signature
get priority():
number
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:51
Returns
number
Set Signature
set priority(
priority):void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:52
Parameters
priority
number
Returns
void
Inherited from
Methods
_attach()
protected_attach():void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:34
Called when the first child is added.
Returns
void
Overrides
_detach()
protected_detach():void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:35
Called when the last child is removed.
Returns
void
Overrides
_get()
protected_get():Output
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:32
Returns
Output
_onChange()
protected_onChange(value,idle?):void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:71
Tell our children about our new value
Parameters
value
Output
idle?
boolean
Returns
void
Inherited from
_onPriorityChange()
protected_onPriorityChange(priority):void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:73
Tell our children about our new priority
Parameters
priority
number
Returns
void
Inherited from
_start()
protected_start():void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:33
Returns
void
advance()
advance(
_dt?):void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:31
Internal
Parameters
_dt?
number
Returns
void
Overrides
eventObserved()
eventObserved(
event):void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:37
Internal
Parameters
event
Returns
void
Overrides
get()
get():
Output
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:54
Get the current value
Returns
Output
Inherited from
interpolate()
interpolate<
Out>(...args):Interpolation<Output,Out>
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:58
Type Parameters
Out
Out
Parameters
args
...InterpolatorArgs<Output, Out>
Returns
Interpolation<Output, Out>
Deprecated
Use the to method instead.
Inherited from
observerAdded()
protectedobserverAdded(count):void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:60
Called after an observer is added.
Parameters
count
number
Returns
void
Inherited from
observerRemoved()
protectedobserverRemoved(count):void
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:61
Called after an observer is removed.
Parameters
count
number
Returns
void
Inherited from
to()
to<
Out>(...args):Interpolation<Output,Out>
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:56
Create a spring that maps our value to another value
Type Parameters
Out
Out
Parameters
args
...InterpolatorArgs<Output, Out>
Returns
Interpolation<Output, Out>
Inherited from
toJSON()
toJSON():
Output
Defined in: node_modules/.pnpm/@react-spring+core@10.1.2_react@19.2.8/node_modules/@react-spring/core/dist/react-spring_core.modern.d.mts:59
Returns
Output