How to use the popmotion.delay function in popmotion

To help you get started, we’ve selected a few popmotion examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github framer / motion / src / animation / utils / transitions.ts View on Github external
target,
        transition
    )

    // Convert durations from Framer Motion seconds into Popmotion milliseconds
    if (isDurationAnimation(opts) && opts.duration) {
        opts.duration *= 1000
    }
    delay *= 1000

    // Bind animation opts to animation
    let animation = animationFactory(opts)

    // Compose delay
    if (delay) {
        animation = chain(delayAction(delay), animation)
    }

    return value.start(complete => {
        const activeAnimation = animation.start({
            update: (v: any) => value.set(v),
            complete,
        })

        return () => activeAnimation.stop()
    })
}
github Popmotion / popmotion / packages / popmotion-pose / src / factories / pose.ts View on Github external
const addActionDelay = (delay = 0, transition: Action) =>
  chain(delayAction(delay), transition);
github Popmotion / popmotion / packages / popmotion-pose / dist / popmotion-pose.es.js View on Github external
var addActionDelay = function (delay$$1, transition) {
    if (delay$$1 === void 0) {
        delay$$1 = 0;
    }
    return chain(delay(delay$$1), transition);
};
var animationLookup = /*#__PURE__*/new Map([['tween', tween], ['spring', spring], ['decay', decay], ['keyframes', keyframes], ['physics', physics]]);
github framer / motion / src / animation / utils / just.ts View on Github external
return action(({ update, complete }) => {
        update(to)
        duration ? delay(duration).start({ complete }) : complete()
    })
}