MCPcopy Create free account
hub / github.com/benjitaylor/agentation / animateIn

Function animateIn

package/example/src/app/components/CodeBlock.tsx:79–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 const outAnimation = useRef<ReturnType<typeof animate> | null>(null);
78
79 const animateIn = async () => {
80 if (
81 !inAnimation.current &&
82 !outAnimation.current &&
83 !hasAnimatedIn.current
84 ) {
85 const animation = animate(inSequence);
86 inAnimation.current = animation;
87 await animation;
88 inAnimation.current = null;
89 if (animation.speed === 1) hasAnimatedIn.current = true;
90 } else if (outAnimation.current) {
91 outAnimation.current.speed = -1;
92 } else if (inAnimation.current) {
93 inAnimation.current.speed = 1;
94 }
95 };
96
97 const animateOut = async () => {
98 if (inAnimation.current) {

Callers 1

CopyButtonFunction · 0.70

Calls 1

animateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…