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

Method _start

packages/core/src/SpringValue.ts:990–1007  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

988 // ensure the latest from/to range is used, and it also ensures this spring
989 // is added to the frameloop.
990 protected _start() {
991 const anim = this.animation
992
993 // Reset the state of each Animated node.
994 getAnimated(this)!.reset(getFluidValue(anim.to))
995
996 // Use the current values as the from values.
997 if (!anim.immediate) {
998 anim.fromValues = anim.values.map(node => node.lastPosition)
999 }
1000
1001 if (!isAnimating(this)) {
1002 setActiveBit(this, true)
1003 if (!isPaused(this)) {
1004 this._resume()
1005 }
1006 }
1007 }
1008
1009 protected _resume() {
1010 // The "skipAnimation" global avoids the frameloop.

Callers 2

eventObservedMethod · 0.95
_mergeMethod · 0.95

Calls 7

_resumeMethod · 0.95
getAnimatedFunction · 0.90
getFluidValueFunction · 0.90
isAnimatingFunction · 0.90
setActiveBitFunction · 0.90
isPausedFunction · 0.90
resetMethod · 0.45

Tested by

no test coverage detected