MCPcopy
hub / github.com/pmndrs/react-spring / constructor

Method constructor

packages/core/src/Interpolation.ts:51–64  ·  view source on GitHub ↗
(
    /** The source of input values */
    readonly source: unknown,
    args: InterpolatorArgs<Input, Output>
  )

Source from the content-addressed store, hash-verified

49 protected _active = new Set<FluidValue>()
50
51 constructor(
52 /** The source of input values */
53 readonly source: unknown,
54 args: InterpolatorArgs<Input, Output>
55 ) {
56 super()
57 this.calc = createInterpolator(...args)
58
59 const value = this._get()
60 const nodeType = getAnimatedType(value)
61
62 // Assume the computed value never changes type.
63 setAnimated(this, nodeType.create(value))
64 }
65
66 advance(_dt?: number) {
67 const value = this._get()

Callers

nothing calls this directly

Calls 5

_getMethod · 0.95
createInterpolatorFunction · 0.90
getAnimatedTypeFunction · 0.90
setAnimatedFunction · 0.90
createMethod · 0.45

Tested by

no test coverage detected