/** * Converts IR keyframe-based animation data to GE BezierKeyframeValue format. * * GE BezierKeyframeValue format per keyframe: * - First: [EASE_OUT(3), [t, v, out_cp_x, out_cp_y]] * - Middle: [EASE(1), [in_cp_x, in_cp_y, t, v, out_cp_x, out_cp_y]] * - Last: [EASE_IN(2), [in_cp_x, in_cp_y, t, v]] * * Time is normalized to [0, 1] based on the layer's visible frame range (ip → op). */ import type { IRAnimatedProperty, IRVec3 } from '@vvfx/animation-ir'; import { type BezierKeyframeValue } from '@galacean/effects-specification'; export interface IRToGETimeContext { /** Layer visible start frame. */ startFrame: number; /** Layer visible end frame. */ endFrame: number; } export interface IRPositionGEResult { /** Timing curves in BezierKeyframeValue format (1D, time-domain only). */ curves: BezierKeyframeValue[][]; /** Path points per segment: [[start_x, start_y], [end_x, end_y]]. */ pathPoints: [[number, number], [number, number]][]; /** Spatial control points per segment: [[to_x, to_y], [ti_x, ti_y]]. */ controlPoints: [[number, number], [number, number]][]; } /** * Convert a 1D animated property (opacity / rotation) to GE BezierKeyframeValue[][]. * Returns a single-element outer array with the full curve. */ export declare function irScalarKeyframesToGE(property: IRAnimatedProperty, timeContext: IRToGETimeContext): BezierKeyframeValue[][] | undefined; /** * Convert a multi-dimensional animated property (scale / anchor) to GE BezierKeyframeValue[][]. * Returns one curve per dimension in the outer array. */ export declare function irVectorKeyframesToGE(property: IRAnimatedProperty, timeContext: IRToGETimeContext): BezierKeyframeValue[][] | undefined; /** * Convert position keyframes to GE path animation format (pp/cp + timing curves). */ export declare function irPositionKeyframesToGE(property: IRAnimatedProperty, timeContext: IRToGETimeContext): IRPositionGEResult | undefined; /** * Determine if a property has enough keyframes to warrant keyframe mode (pkf/skf/rkf/okf). */ export declare function shouldUseKeyframeMode(property: IRAnimatedProperty): boolean;