animationKey.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import type { IEasingFunction } from "./easing";
  2. /**
  3. * Defines an interface which represents an animation key frame
  4. */
  5. export interface IAnimationKey {
  6. /**
  7. * Frame of the key frame
  8. */
  9. frame: number;
  10. /**
  11. * Value at the specifies key frame
  12. */
  13. value: any;
  14. /**
  15. * The input tangent for the cubic hermite spline
  16. */
  17. inTangent?: any;
  18. /**
  19. * The output tangent for the cubic hermite spline
  20. */
  21. outTangent?: any;
  22. /**
  23. * The animation interpolation type
  24. */
  25. interpolation?: AnimationKeyInterpolation;
  26. /**
  27. * Property defined by UI tools to link (or not ) the tangents
  28. */
  29. lockedTangent?: boolean;
  30. /**
  31. * The easing function associated with the key frame (optional). If not defined, the easing function defined at the animation level (if any) will be used instead
  32. */
  33. easingFunction?: IEasingFunction;
  34. }
  35. /**
  36. * Enum for the animation key frame interpolation type
  37. */
  38. export declare enum AnimationKeyInterpolation {
  39. /**
  40. * Use tangents to interpolate between start and end values.
  41. */
  42. NONE = 0,
  43. /**
  44. * Do not interpolate between keys and use the start key value only. Tangents are ignored
  45. */
  46. STEP = 1
  47. }