import { HNode, Vec3, LoopBehaviour, EasingType } from '@hiberworld/code-kit';
import { DefaultOptions, Duration } from './types';
export type TweenOptions = DefaultOptions & {
    duration: Duration | number;
    progress: number;
    speedMultiplier: number;
    loopBehaviour: LoopBehaviour;
    autoWrap: boolean;
};
export interface KeyFrameOptions {
    p?: Vec3;
    r?: Vec3;
    s?: Vec3;
    ts: number;
    easing?: EasingType;
}
/**
 * This module provides a function, getTween,
 * that smoothly transitions a given target node through a series of keyframes.
 * The keyframes are defined by an array of KeyFrameOptions,
 * ts = TimeStamp, is set as percent of duration. 0 - 1.
 * autoWrap: if true, the transform will copied to the wrapper node and reset on the target node.
 * @example
 * ```ts
 
// Basic usage
let spr: HNode = getPrefab({ id: 'sphere_01', p: [0, 0, 15], r: [0, 0, 90] });
spr = getTween(
  spr,
  [
    { ts: 0.25, p: [0, 2, 0] },
    { ts: 1, p: [0, 0, 0] },
  ],
  { loopBehaviour: 'RESTART', duration: 4 }
);

// Advanced usage
const kf: KeyFrameOptions[] = [
  { ts: 0, s: [1, 1, 1], easing: 'EASE_OUT_ELASTIC' },
  { ts: 0.25, p: [0, 2, 0] },
  { ts: 0.5, p: [2, 4, 0] },
  { ts: 0.5, r: [0, 90, 180] },
  { ts: 0.75, p: [2, 0, 0] },
  { ts: 0.5, s: [2.5, 3, 2.0] },
  { ts: 0.8, r: [0, 90, 0] },
  { ts: 1, p: [0, 0, 0] },
  { ts: 1, s: [1, 1, 1] },
];
let spr: HNode = getPrefab({ id: 'sphere_01', p: [0, 4, 15], r: [0, 0, 10] });
spr = getTween(spr, kf, { loopBehaviour: 'RESTART', duration: 4 });
addTo(world, spr);
 * ```
 */
export declare const getTween: (target: HNode, kfs?: KeyFrameOptions[], options?: Partial<TweenOptions>) => HNode;
//# sourceMappingURL=getTween.d.ts.map