Skip to content

hm5-types (source format) / EasingSpec

Type Alias: EasingSpec ​

ts
type EasingSpec = 
  | {
  kind: "auto";
}
  | {
  kind: "preset";
  name:   | "linear"
     | "easeIn"
     | "easeOut"
     | "easeInOut"
     | "backOut"
     | "bounceOut"
     | "backIn"
     | "backInOut"
     | "bounceIn"
     | "bounceInOut"
     | "elasticIn"
     | "elasticOut"
     | "elasticInOut";
}
  | {
  kind: "bezier";
  points: [float, float, float, float];
}
  | {
  keys: object[];
  kind: "curve";
};

Union Members ​

Type Literal ​

ts
{
  kind: "auto";
}

heuristic best-fit (the DEFAULT — see the auto note below)


Type Literal ​

ts
{
  kind: "preset";
  name:   | "linear"
     | "easeIn"
     | "easeOut"
     | "easeInOut"
     | "backOut"
     | "bounceOut"
     | "backIn"
     | "backInOut"
     | "bounceIn"
     | "bounceInOut"
     | "elasticIn"
     | "elasticOut"
     | "elasticInOut";
}

Type Literal ​

ts
{
  kind: "bezier";
  points: [float, float, float, float];
}

css-style cubic


Type Literal ​

ts
{
  keys: object[];
  kind: "curve";
}

hand-drawn curve from the Tween panel

HereSplash — 2D animation for the web