import { getTween } from './getTween';
/**
 * Helper to animated an objects position.
 * @example
 * ```
  const spr = getPrefab({ id: 'sphere_01', p: [0, 1, 10], r: [0, 0, 40] });
  addTo(world, getMoving(spr));
 * ```
 */
export const getMoving = (target, options) => {
    const { duration = 2, progress = 0, speedMultiplier = 1, easing = 'EASE_IN_OUT_QUAD', loopBehaviour = 'REVERSE', to = [0, 2, 0], autoWrap = true, p = undefined, r = undefined, s = undefined, } = options || {};
    const kf = [
        {
            ts: 0,
            p: [0, 0, 0],
            easing,
        },
        {
            ts: 1,
            p: to,
            easing,
        },
    ];
    return getTween(target, kf, { loopBehaviour, duration, progress, speedMultiplier, autoWrap, p, r, s });
};
//# sourceMappingURL=getMoving.js.map