Merge
Combine multiple actions into one output.
Import
import { merge } from 'popmotion';Usage
merge(
tween(),
action(({ update }) => update(1)),
physics({ velocity: 1000 })
).start((v) => console.log(v));Methods
Action methods
merge() returns:
filter((v: any) => boolean): Returns a new action that filters out values when the provided function returnsfalse.pipe(...funcs: Array<(v) => v): Returns a new action that will runupdatevalues through this sequence of functions.start(update | { update, complete }): Starts the action and returns a subscription.while((v: any) => boolean): Returns a new action that willcompletewhen the provided function returnsfalse.
Subscription methods
merge().start() returns:
stop(): void