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

Function frameObserver

packages/core/test/setup.ts:86–93  ·  view source on GitHub ↗
(event: FrameValue.Event)

Source from the content-addressed store, hash-verified

84// This observes every SpringValue animation when "advanceUntil" is used.
85// Any changes between frames are not recorded.
86const frameObserver = (event: FrameValue.Event) => {
87 const spring = event.parent
88 if (event.type == 'change') {
89 let frames = frameCache.get(spring)
90 if (!frames) frameCache.set(spring, (frames = []))
91 frames.push(event.value)
92 }
93}
94
95globalThis.getFrames = (target, preserve) => {
96 let frames = frameCache.get(target)!

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…