@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
17 lines • 880 B
TypeScript
/**
* Subdivide a curve segment by introducing a new keyframe at a given normalized time.
* Subdivision does not alter the curve shape in any way, it is intended primarily for editing purposes.
*
* @param {Keyframe} out keyframe to be added at the point of subdivision, its tangents, time and value will be overwritten
* @param {Keyframe} key0 start of the segment
* @param {Keyframe} key1 end of the segment
* @param {number} t normalized time in [0..1] between key0 and key1 where new frame is to be inserted
* @returns {Keyframe} `out`, for convenience
*
* @see AnimationCurve
* @example
* const new_frame = animation_curve_subdivide(new Keyframe(), key0, key1, 0.5);
* curve.add(new_frame);
*/
export function animation_curve_subdivide(out: Keyframe, key0: Keyframe, key1: Keyframe, t: number): Keyframe;
//# sourceMappingURL=animation_curve_subdivide.d.ts.map