first commit
This commit is contained in:
18
node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs
generated
vendored
Normal file
18
node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { observeTimeline } from 'motion-dom';
|
||||
import { getTimeline } from './utils/get-timeline.mjs';
|
||||
|
||||
function attachToAnimation(animation, options) {
|
||||
const timeline = getTimeline(options);
|
||||
return animation.attachTimeline({
|
||||
timeline: options.target ? undefined : timeline,
|
||||
observe: (valueAnimation) => {
|
||||
valueAnimation.pause();
|
||||
return observeTimeline((progress) => {
|
||||
valueAnimation.time =
|
||||
valueAnimation.iterationDuration * progress;
|
||||
}, timeline);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export { attachToAnimation };
|
||||
Reference in New Issue
Block a user