ixfx
    Preparing search index...

    Function tickEasing

    • Creates an easing based on ticks.

      tickEasing allows you to reset and check for completion. Alternatively, use ticks which is a simple function that just returns a value.

      Parameters

      • nameOrFunction:
            | "bounceOut"
            | "quintIn"
            | "quintOut"
            | "arch"
            | "smoothstep"
            | "smootherstep"
            | "sineIn"
            | "sineOut"
            | "quadIn"
            | "quadOut"
            | "sineInOut"
            | "quadInOut"
            | "cubicIn"
            | "cubicOut"
            | "quartIn"
            | "quartOut"
            | "expoIn"
            | "expoOut"
            | "quintInOut"
            | "expoInOut"
            | "circIn"
            | "circOut"
            | "backIn"
            | "backOut"
            | "circInOut"
            | "backInOut"
            | "elasticIn"
            | "elasticOut"
            | "bounceIn"
            | "bell"
            | "elasticInOut"
            | "bounceInOut"
            | (v: number) => number

        Name of easing, or an easing function

      • durationTicks: number

        Duration in ticks

      Returns ModulatorTimed

      Easing

      import { Easings } from "https://unpkg.com/ixfx/dist/modulation.js";
      const t = Easings.tickEasing(`sineIn`, 1000); // Will take 1000 ticks to complete
      t.compute(); // Each call to `compute` progresses the tick count
      t.reset(); // Reset to 0
      t.isDone; // _True_ if finished